lua_Transform.cpp 127 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_Transform.h"
  4. #include "Animation.h"
  5. #include "AnimationTarget.h"
  6. #include "Base.h"
  7. #include "Game.h"
  8. #include "Node.h"
  9. #include "ScriptController.h"
  10. #include "ScriptTarget.h"
  11. #include "Transform.h"
  12. #include "lua_CurveInterpolationType.h"
  13. namespace gameplay
  14. {
  15. void luaRegister_Transform()
  16. {
  17. const luaL_Reg lua_members[] =
  18. {
  19. {"addListener", lua_Transform_addListener},
  20. {"addScriptCallback", lua_Transform_addScriptCallback},
  21. {"createAnimation", lua_Transform_createAnimation},
  22. {"createAnimationFromBy", lua_Transform_createAnimationFromBy},
  23. {"createAnimationFromTo", lua_Transform_createAnimationFromTo},
  24. {"destroyAnimation", lua_Transform_destroyAnimation},
  25. {"getAnimation", lua_Transform_getAnimation},
  26. {"getAnimationPropertyComponentCount", lua_Transform_getAnimationPropertyComponentCount},
  27. {"getAnimationPropertyValue", lua_Transform_getAnimationPropertyValue},
  28. {"getBackVector", lua_Transform_getBackVector},
  29. {"getDownVector", lua_Transform_getDownVector},
  30. {"getForwardVector", lua_Transform_getForwardVector},
  31. {"getLeftVector", lua_Transform_getLeftVector},
  32. {"getMatrix", lua_Transform_getMatrix},
  33. {"getRightVector", lua_Transform_getRightVector},
  34. {"getRotation", lua_Transform_getRotation},
  35. {"getScale", lua_Transform_getScale},
  36. {"getScaleX", lua_Transform_getScaleX},
  37. {"getScaleY", lua_Transform_getScaleY},
  38. {"getScaleZ", lua_Transform_getScaleZ},
  39. {"getTranslation", lua_Transform_getTranslation},
  40. {"getTranslationX", lua_Transform_getTranslationX},
  41. {"getTranslationY", lua_Transform_getTranslationY},
  42. {"getTranslationZ", lua_Transform_getTranslationZ},
  43. {"getUpVector", lua_Transform_getUpVector},
  44. {"removeListener", lua_Transform_removeListener},
  45. {"removeScriptCallback", lua_Transform_removeScriptCallback},
  46. {"rotate", lua_Transform_rotate},
  47. {"rotateX", lua_Transform_rotateX},
  48. {"rotateY", lua_Transform_rotateY},
  49. {"rotateZ", lua_Transform_rotateZ},
  50. {"scale", lua_Transform_scale},
  51. {"scaleX", lua_Transform_scaleX},
  52. {"scaleY", lua_Transform_scaleY},
  53. {"scaleZ", lua_Transform_scaleZ},
  54. {"set", lua_Transform_set},
  55. {"setAnimationPropertyValue", lua_Transform_setAnimationPropertyValue},
  56. {"setIdentity", lua_Transform_setIdentity},
  57. {"setRotation", lua_Transform_setRotation},
  58. {"setScale", lua_Transform_setScale},
  59. {"setScaleX", lua_Transform_setScaleX},
  60. {"setScaleY", lua_Transform_setScaleY},
  61. {"setScaleZ", lua_Transform_setScaleZ},
  62. {"setTranslation", lua_Transform_setTranslation},
  63. {"setTranslationX", lua_Transform_setTranslationX},
  64. {"setTranslationY", lua_Transform_setTranslationY},
  65. {"setTranslationZ", lua_Transform_setTranslationZ},
  66. {"transformPoint", lua_Transform_transformPoint},
  67. {"transformVector", lua_Transform_transformVector},
  68. {"translate", lua_Transform_translate},
  69. {"translateForward", lua_Transform_translateForward},
  70. {"translateLeft", lua_Transform_translateLeft},
  71. {"translateSmooth", lua_Transform_translateSmooth},
  72. {"translateUp", lua_Transform_translateUp},
  73. {"translateX", lua_Transform_translateX},
  74. {"translateY", lua_Transform_translateY},
  75. {"translateZ", lua_Transform_translateZ},
  76. {NULL, NULL}
  77. };
  78. const luaL_Reg lua_statics[] =
  79. {
  80. {"ANIMATE_ROTATE", lua_Transform_static_ANIMATE_ROTATE},
  81. {"ANIMATE_ROTATE_TRANSLATE", lua_Transform_static_ANIMATE_ROTATE_TRANSLATE},
  82. {"ANIMATE_SCALE", lua_Transform_static_ANIMATE_SCALE},
  83. {"ANIMATE_SCALE_ROTATE", lua_Transform_static_ANIMATE_SCALE_ROTATE},
  84. {"ANIMATE_SCALE_ROTATE_TRANSLATE", lua_Transform_static_ANIMATE_SCALE_ROTATE_TRANSLATE},
  85. {"ANIMATE_SCALE_TRANSLATE", lua_Transform_static_ANIMATE_SCALE_TRANSLATE},
  86. {"ANIMATE_SCALE_UNIT", lua_Transform_static_ANIMATE_SCALE_UNIT},
  87. {"ANIMATE_SCALE_X", lua_Transform_static_ANIMATE_SCALE_X},
  88. {"ANIMATE_SCALE_Y", lua_Transform_static_ANIMATE_SCALE_Y},
  89. {"ANIMATE_SCALE_Z", lua_Transform_static_ANIMATE_SCALE_Z},
  90. {"ANIMATE_TRANSLATE", lua_Transform_static_ANIMATE_TRANSLATE},
  91. {"ANIMATE_TRANSLATE_X", lua_Transform_static_ANIMATE_TRANSLATE_X},
  92. {"ANIMATE_TRANSLATE_Y", lua_Transform_static_ANIMATE_TRANSLATE_Y},
  93. {"ANIMATE_TRANSLATE_Z", lua_Transform_static_ANIMATE_TRANSLATE_Z},
  94. {"isTransformChangedSuspended", lua_Transform_static_isTransformChangedSuspended},
  95. {"resumeTransformChanged", lua_Transform_static_resumeTransformChanged},
  96. {"suspendTransformChanged", lua_Transform_static_suspendTransformChanged},
  97. {NULL, NULL}
  98. };
  99. std::vector<std::string> scopePath;
  100. ScriptUtil::registerClass("Transform", lua_members, lua_Transform__init, lua_Transform__gc, lua_statics, scopePath);
  101. }
  102. static Transform* getInstance(lua_State* state)
  103. {
  104. void* userdata = luaL_checkudata(state, 1, "Transform");
  105. luaL_argcheck(state, userdata != NULL, 1, "'Transform' expected.");
  106. return (Transform*)((ScriptUtil::LuaObject*)userdata)->instance;
  107. }
  108. int lua_Transform__gc(lua_State* state)
  109. {
  110. // Get the number of parameters.
  111. int paramCount = lua_gettop(state);
  112. // Attempt to match the parameters to a valid binding.
  113. switch (paramCount)
  114. {
  115. case 1:
  116. {
  117. if ((lua_type(state, 1) == LUA_TUSERDATA))
  118. {
  119. void* userdata = luaL_checkudata(state, 1, "Transform");
  120. luaL_argcheck(state, userdata != NULL, 1, "'Transform' expected.");
  121. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)userdata;
  122. if (object->owns)
  123. {
  124. Transform* instance = (Transform*)object->instance;
  125. SAFE_DELETE(instance);
  126. }
  127. return 0;
  128. }
  129. else
  130. {
  131. lua_pushstring(state, "lua_Transform__gc - Failed to match the given parameters to a valid function signature.");
  132. lua_error(state);
  133. }
  134. break;
  135. }
  136. default:
  137. {
  138. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  139. lua_error(state);
  140. break;
  141. }
  142. }
  143. return 0;
  144. }
  145. int lua_Transform__init(lua_State* state)
  146. {
  147. // Get the number of parameters.
  148. int paramCount = lua_gettop(state);
  149. // Attempt to match the parameters to a valid binding.
  150. switch (paramCount)
  151. {
  152. case 0:
  153. {
  154. void* returnPtr = (void*)new Transform();
  155. if (returnPtr)
  156. {
  157. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  158. object->instance = returnPtr;
  159. object->owns = true;
  160. luaL_getmetatable(state, "Transform");
  161. lua_setmetatable(state, -2);
  162. }
  163. else
  164. {
  165. lua_pushnil(state);
  166. }
  167. return 1;
  168. break;
  169. }
  170. case 1:
  171. {
  172. if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TNIL))
  173. {
  174. // Get parameter 1 off the stack.
  175. ScriptUtil::LuaArray<Transform> param1 = ScriptUtil::getObjectPointer<Transform>(1, "Transform", true);
  176. void* returnPtr = (void*)new Transform(*param1);
  177. if (returnPtr)
  178. {
  179. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  180. object->instance = returnPtr;
  181. object->owns = true;
  182. luaL_getmetatable(state, "Transform");
  183. lua_setmetatable(state, -2);
  184. }
  185. else
  186. {
  187. lua_pushnil(state);
  188. }
  189. return 1;
  190. }
  191. else
  192. {
  193. lua_pushstring(state, "lua_Transform__init - Failed to match the given parameters to a valid function signature.");
  194. lua_error(state);
  195. }
  196. break;
  197. }
  198. case 3:
  199. {
  200. if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TNIL) &&
  201. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  202. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  203. {
  204. // Get parameter 1 off the stack.
  205. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(1, "Vector3", true);
  206. // Get parameter 2 off the stack.
  207. ScriptUtil::LuaArray<Quaternion> param2 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true);
  208. // Get parameter 3 off the stack.
  209. ScriptUtil::LuaArray<Vector3> param3 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true);
  210. void* returnPtr = (void*)new Transform(*param1, *param2, *param3);
  211. if (returnPtr)
  212. {
  213. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  214. object->instance = returnPtr;
  215. object->owns = true;
  216. luaL_getmetatable(state, "Transform");
  217. lua_setmetatable(state, -2);
  218. }
  219. else
  220. {
  221. lua_pushnil(state);
  222. }
  223. return 1;
  224. }
  225. else if ((lua_type(state, 1) == LUA_TUSERDATA || lua_type(state, 1) == LUA_TNIL) &&
  226. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  227. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  228. {
  229. // Get parameter 1 off the stack.
  230. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(1, "Vector3", true);
  231. // Get parameter 2 off the stack.
  232. ScriptUtil::LuaArray<Matrix> param2 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true);
  233. // Get parameter 3 off the stack.
  234. ScriptUtil::LuaArray<Vector3> param3 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true);
  235. void* returnPtr = (void*)new Transform(*param1, *param2, *param3);
  236. if (returnPtr)
  237. {
  238. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  239. object->instance = returnPtr;
  240. object->owns = true;
  241. luaL_getmetatable(state, "Transform");
  242. lua_setmetatable(state, -2);
  243. }
  244. else
  245. {
  246. lua_pushnil(state);
  247. }
  248. return 1;
  249. }
  250. else
  251. {
  252. lua_pushstring(state, "lua_Transform__init - Failed to match the given parameters to a valid function signature.");
  253. lua_error(state);
  254. }
  255. break;
  256. }
  257. default:
  258. {
  259. lua_pushstring(state, "Invalid number of parameters (expected 0, 1 or 3).");
  260. lua_error(state);
  261. break;
  262. }
  263. }
  264. return 0;
  265. }
  266. int lua_Transform_addListener(lua_State* state)
  267. {
  268. // Get the number of parameters.
  269. int paramCount = lua_gettop(state);
  270. // Attempt to match the parameters to a valid binding.
  271. switch (paramCount)
  272. {
  273. case 2:
  274. {
  275. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  276. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  277. {
  278. // Get parameter 1 off the stack.
  279. ScriptUtil::LuaArray<Transform::Listener> param1 = ScriptUtil::getObjectPointer<Transform::Listener>(2, "TransformListener", false);
  280. Transform* instance = getInstance(state);
  281. instance->addListener(param1);
  282. return 0;
  283. }
  284. else
  285. {
  286. lua_pushstring(state, "lua_Transform_addListener - Failed to match the given parameters to a valid function signature.");
  287. lua_error(state);
  288. }
  289. break;
  290. }
  291. case 3:
  292. {
  293. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  294. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  295. lua_type(state, 3) == LUA_TNUMBER)
  296. {
  297. // Get parameter 1 off the stack.
  298. ScriptUtil::LuaArray<Transform::Listener> param1 = ScriptUtil::getObjectPointer<Transform::Listener>(2, "TransformListener", false);
  299. // Get parameter 2 off the stack.
  300. long param2 = (long)luaL_checklong(state, 3);
  301. Transform* instance = getInstance(state);
  302. instance->addListener(param1, param2);
  303. return 0;
  304. }
  305. else
  306. {
  307. lua_pushstring(state, "lua_Transform_addListener - Failed to match the given parameters to a valid function signature.");
  308. lua_error(state);
  309. }
  310. break;
  311. }
  312. default:
  313. {
  314. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  315. lua_error(state);
  316. break;
  317. }
  318. }
  319. return 0;
  320. }
  321. int lua_Transform_addScriptCallback(lua_State* state)
  322. {
  323. // Get the number of parameters.
  324. int paramCount = lua_gettop(state);
  325. // Attempt to match the parameters to a valid binding.
  326. switch (paramCount)
  327. {
  328. case 3:
  329. {
  330. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  331. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  332. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  333. {
  334. // Get parameter 1 off the stack.
  335. std::string param1 = ScriptUtil::getString(2, true);
  336. // Get parameter 2 off the stack.
  337. std::string param2 = ScriptUtil::getString(3, true);
  338. Transform* instance = getInstance(state);
  339. instance->addScriptCallback(param1, param2);
  340. return 0;
  341. }
  342. else
  343. {
  344. lua_pushstring(state, "lua_Transform_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  345. lua_error(state);
  346. }
  347. break;
  348. }
  349. default:
  350. {
  351. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  352. lua_error(state);
  353. break;
  354. }
  355. }
  356. return 0;
  357. }
  358. int lua_Transform_createAnimation(lua_State* state)
  359. {
  360. // Get the number of parameters.
  361. int paramCount = lua_gettop(state);
  362. // Attempt to match the parameters to a valid binding.
  363. switch (paramCount)
  364. {
  365. case 3:
  366. {
  367. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  368. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  369. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  370. {
  371. // Get parameter 1 off the stack.
  372. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  373. // Get parameter 2 off the stack.
  374. ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
  375. Transform* instance = getInstance(state);
  376. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  377. if (returnPtr)
  378. {
  379. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  380. object->instance = returnPtr;
  381. object->owns = false;
  382. luaL_getmetatable(state, "Animation");
  383. lua_setmetatable(state, -2);
  384. }
  385. else
  386. {
  387. lua_pushnil(state);
  388. }
  389. return 1;
  390. }
  391. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  392. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  393. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  394. {
  395. // Get parameter 1 off the stack.
  396. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  397. // Get parameter 2 off the stack.
  398. ScriptUtil::LuaArray<Properties> param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false);
  399. Transform* instance = getInstance(state);
  400. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  401. if (returnPtr)
  402. {
  403. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  404. object->instance = returnPtr;
  405. object->owns = false;
  406. luaL_getmetatable(state, "Animation");
  407. lua_setmetatable(state, -2);
  408. }
  409. else
  410. {
  411. lua_pushnil(state);
  412. }
  413. return 1;
  414. }
  415. else
  416. {
  417. lua_pushstring(state, "lua_Transform_createAnimation - Failed to match the given parameters to a valid function signature.");
  418. lua_error(state);
  419. }
  420. break;
  421. }
  422. case 7:
  423. {
  424. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  425. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  426. lua_type(state, 3) == LUA_TNUMBER &&
  427. lua_type(state, 4) == LUA_TNUMBER &&
  428. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  429. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  430. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  431. {
  432. // Get parameter 1 off the stack.
  433. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  434. // Get parameter 2 off the stack.
  435. int param2 = (int)luaL_checkint(state, 3);
  436. // Get parameter 3 off the stack.
  437. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  438. // Get parameter 4 off the stack.
  439. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  440. // Get parameter 5 off the stack.
  441. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  442. // Get parameter 6 off the stack.
  443. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  444. Transform* instance = getInstance(state);
  445. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  446. if (returnPtr)
  447. {
  448. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  449. object->instance = returnPtr;
  450. object->owns = false;
  451. luaL_getmetatable(state, "Animation");
  452. lua_setmetatable(state, -2);
  453. }
  454. else
  455. {
  456. lua_pushnil(state);
  457. }
  458. return 1;
  459. }
  460. else
  461. {
  462. lua_pushstring(state, "lua_Transform_createAnimation - Failed to match the given parameters to a valid function signature.");
  463. lua_error(state);
  464. }
  465. break;
  466. }
  467. case 9:
  468. {
  469. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  470. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  471. lua_type(state, 3) == LUA_TNUMBER &&
  472. lua_type(state, 4) == LUA_TNUMBER &&
  473. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  474. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  475. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  476. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  477. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  478. {
  479. // Get parameter 1 off the stack.
  480. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  481. // Get parameter 2 off the stack.
  482. int param2 = (int)luaL_checkint(state, 3);
  483. // Get parameter 3 off the stack.
  484. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  485. // Get parameter 4 off the stack.
  486. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  487. // Get parameter 5 off the stack.
  488. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  489. // Get parameter 6 off the stack.
  490. ScriptUtil::LuaArray<float> param6 = ScriptUtil::getFloatPointer(7);
  491. // Get parameter 7 off the stack.
  492. ScriptUtil::LuaArray<float> param7 = ScriptUtil::getFloatPointer(8);
  493. // Get parameter 8 off the stack.
  494. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  495. Transform* instance = getInstance(state);
  496. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  497. if (returnPtr)
  498. {
  499. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  500. object->instance = returnPtr;
  501. object->owns = false;
  502. luaL_getmetatable(state, "Animation");
  503. lua_setmetatable(state, -2);
  504. }
  505. else
  506. {
  507. lua_pushnil(state);
  508. }
  509. return 1;
  510. }
  511. else
  512. {
  513. lua_pushstring(state, "lua_Transform_createAnimation - Failed to match the given parameters to a valid function signature.");
  514. lua_error(state);
  515. }
  516. break;
  517. }
  518. default:
  519. {
  520. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  521. lua_error(state);
  522. break;
  523. }
  524. }
  525. return 0;
  526. }
  527. int lua_Transform_createAnimationFromBy(lua_State* state)
  528. {
  529. // Get the number of parameters.
  530. int paramCount = lua_gettop(state);
  531. // Attempt to match the parameters to a valid binding.
  532. switch (paramCount)
  533. {
  534. case 7:
  535. {
  536. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  537. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  538. lua_type(state, 3) == LUA_TNUMBER &&
  539. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  540. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  541. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  542. lua_type(state, 7) == LUA_TNUMBER)
  543. {
  544. // Get parameter 1 off the stack.
  545. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  546. // Get parameter 2 off the stack.
  547. int param2 = (int)luaL_checkint(state, 3);
  548. // Get parameter 3 off the stack.
  549. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  550. // Get parameter 4 off the stack.
  551. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  552. // Get parameter 5 off the stack.
  553. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  554. // Get parameter 6 off the stack.
  555. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  556. Transform* instance = getInstance(state);
  557. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  558. if (returnPtr)
  559. {
  560. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  561. object->instance = returnPtr;
  562. object->owns = false;
  563. luaL_getmetatable(state, "Animation");
  564. lua_setmetatable(state, -2);
  565. }
  566. else
  567. {
  568. lua_pushnil(state);
  569. }
  570. return 1;
  571. }
  572. else
  573. {
  574. lua_pushstring(state, "lua_Transform_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  575. lua_error(state);
  576. }
  577. break;
  578. }
  579. default:
  580. {
  581. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  582. lua_error(state);
  583. break;
  584. }
  585. }
  586. return 0;
  587. }
  588. int lua_Transform_createAnimationFromTo(lua_State* state)
  589. {
  590. // Get the number of parameters.
  591. int paramCount = lua_gettop(state);
  592. // Attempt to match the parameters to a valid binding.
  593. switch (paramCount)
  594. {
  595. case 7:
  596. {
  597. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  598. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  599. lua_type(state, 3) == LUA_TNUMBER &&
  600. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  601. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  602. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  603. lua_type(state, 7) == LUA_TNUMBER)
  604. {
  605. // Get parameter 1 off the stack.
  606. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  607. // Get parameter 2 off the stack.
  608. int param2 = (int)luaL_checkint(state, 3);
  609. // Get parameter 3 off the stack.
  610. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  611. // Get parameter 4 off the stack.
  612. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  613. // Get parameter 5 off the stack.
  614. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  615. // Get parameter 6 off the stack.
  616. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  617. Transform* instance = getInstance(state);
  618. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  619. if (returnPtr)
  620. {
  621. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  622. object->instance = returnPtr;
  623. object->owns = false;
  624. luaL_getmetatable(state, "Animation");
  625. lua_setmetatable(state, -2);
  626. }
  627. else
  628. {
  629. lua_pushnil(state);
  630. }
  631. return 1;
  632. }
  633. else
  634. {
  635. lua_pushstring(state, "lua_Transform_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  636. lua_error(state);
  637. }
  638. break;
  639. }
  640. default:
  641. {
  642. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  643. lua_error(state);
  644. break;
  645. }
  646. }
  647. return 0;
  648. }
  649. int lua_Transform_destroyAnimation(lua_State* state)
  650. {
  651. // Get the number of parameters.
  652. int paramCount = lua_gettop(state);
  653. // Attempt to match the parameters to a valid binding.
  654. switch (paramCount)
  655. {
  656. case 1:
  657. {
  658. if ((lua_type(state, 1) == LUA_TUSERDATA))
  659. {
  660. Transform* instance = getInstance(state);
  661. instance->destroyAnimation();
  662. return 0;
  663. }
  664. else
  665. {
  666. lua_pushstring(state, "lua_Transform_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  667. lua_error(state);
  668. }
  669. break;
  670. }
  671. case 2:
  672. {
  673. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  674. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  675. {
  676. // Get parameter 1 off the stack.
  677. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  678. Transform* instance = getInstance(state);
  679. instance->destroyAnimation(param1);
  680. return 0;
  681. }
  682. else
  683. {
  684. lua_pushstring(state, "lua_Transform_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  685. lua_error(state);
  686. }
  687. break;
  688. }
  689. default:
  690. {
  691. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  692. lua_error(state);
  693. break;
  694. }
  695. }
  696. return 0;
  697. }
  698. int lua_Transform_getAnimation(lua_State* state)
  699. {
  700. // Get the number of parameters.
  701. int paramCount = lua_gettop(state);
  702. // Attempt to match the parameters to a valid binding.
  703. switch (paramCount)
  704. {
  705. case 1:
  706. {
  707. if ((lua_type(state, 1) == LUA_TUSERDATA))
  708. {
  709. Transform* instance = getInstance(state);
  710. void* returnPtr = (void*)instance->getAnimation();
  711. if (returnPtr)
  712. {
  713. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  714. object->instance = returnPtr;
  715. object->owns = false;
  716. luaL_getmetatable(state, "Animation");
  717. lua_setmetatable(state, -2);
  718. }
  719. else
  720. {
  721. lua_pushnil(state);
  722. }
  723. return 1;
  724. }
  725. else
  726. {
  727. lua_pushstring(state, "lua_Transform_getAnimation - Failed to match the given parameters to a valid function signature.");
  728. lua_error(state);
  729. }
  730. break;
  731. }
  732. case 2:
  733. {
  734. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  735. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  736. {
  737. // Get parameter 1 off the stack.
  738. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  739. Transform* instance = getInstance(state);
  740. void* returnPtr = (void*)instance->getAnimation(param1);
  741. if (returnPtr)
  742. {
  743. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  744. object->instance = returnPtr;
  745. object->owns = false;
  746. luaL_getmetatable(state, "Animation");
  747. lua_setmetatable(state, -2);
  748. }
  749. else
  750. {
  751. lua_pushnil(state);
  752. }
  753. return 1;
  754. }
  755. else
  756. {
  757. lua_pushstring(state, "lua_Transform_getAnimation - Failed to match the given parameters to a valid function signature.");
  758. lua_error(state);
  759. }
  760. break;
  761. }
  762. default:
  763. {
  764. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  765. lua_error(state);
  766. break;
  767. }
  768. }
  769. return 0;
  770. }
  771. int lua_Transform_getAnimationPropertyComponentCount(lua_State* state)
  772. {
  773. // Get the number of parameters.
  774. int paramCount = lua_gettop(state);
  775. // Attempt to match the parameters to a valid binding.
  776. switch (paramCount)
  777. {
  778. case 2:
  779. {
  780. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  781. lua_type(state, 2) == LUA_TNUMBER)
  782. {
  783. // Get parameter 1 off the stack.
  784. int param1 = (int)luaL_checkint(state, 2);
  785. Transform* instance = getInstance(state);
  786. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  787. // Push the return value onto the stack.
  788. lua_pushunsigned(state, result);
  789. return 1;
  790. }
  791. else
  792. {
  793. lua_pushstring(state, "lua_Transform_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  794. lua_error(state);
  795. }
  796. break;
  797. }
  798. default:
  799. {
  800. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  801. lua_error(state);
  802. break;
  803. }
  804. }
  805. return 0;
  806. }
  807. int lua_Transform_getAnimationPropertyValue(lua_State* state)
  808. {
  809. // Get the number of parameters.
  810. int paramCount = lua_gettop(state);
  811. // Attempt to match the parameters to a valid binding.
  812. switch (paramCount)
  813. {
  814. case 3:
  815. {
  816. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  817. lua_type(state, 2) == LUA_TNUMBER &&
  818. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  819. {
  820. // Get parameter 1 off the stack.
  821. int param1 = (int)luaL_checkint(state, 2);
  822. // Get parameter 2 off the stack.
  823. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  824. Transform* instance = getInstance(state);
  825. instance->getAnimationPropertyValue(param1, param2);
  826. return 0;
  827. }
  828. else
  829. {
  830. lua_pushstring(state, "lua_Transform_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  831. lua_error(state);
  832. }
  833. break;
  834. }
  835. default:
  836. {
  837. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  838. lua_error(state);
  839. break;
  840. }
  841. }
  842. return 0;
  843. }
  844. int lua_Transform_getBackVector(lua_State* state)
  845. {
  846. // Get the number of parameters.
  847. int paramCount = lua_gettop(state);
  848. // Attempt to match the parameters to a valid binding.
  849. switch (paramCount)
  850. {
  851. case 1:
  852. {
  853. if ((lua_type(state, 1) == LUA_TUSERDATA))
  854. {
  855. Transform* instance = getInstance(state);
  856. void* returnPtr = (void*)new Vector3(instance->getBackVector());
  857. if (returnPtr)
  858. {
  859. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  860. object->instance = returnPtr;
  861. object->owns = true;
  862. luaL_getmetatable(state, "Vector3");
  863. lua_setmetatable(state, -2);
  864. }
  865. else
  866. {
  867. lua_pushnil(state);
  868. }
  869. return 1;
  870. }
  871. else
  872. {
  873. lua_pushstring(state, "lua_Transform_getBackVector - Failed to match the given parameters to a valid function signature.");
  874. lua_error(state);
  875. }
  876. break;
  877. }
  878. case 2:
  879. {
  880. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  881. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  882. {
  883. // Get parameter 1 off the stack.
  884. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  885. Transform* instance = getInstance(state);
  886. instance->getBackVector(param1);
  887. return 0;
  888. }
  889. else
  890. {
  891. lua_pushstring(state, "lua_Transform_getBackVector - Failed to match the given parameters to a valid function signature.");
  892. lua_error(state);
  893. }
  894. break;
  895. }
  896. default:
  897. {
  898. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  899. lua_error(state);
  900. break;
  901. }
  902. }
  903. return 0;
  904. }
  905. int lua_Transform_getDownVector(lua_State* state)
  906. {
  907. // Get the number of parameters.
  908. int paramCount = lua_gettop(state);
  909. // Attempt to match the parameters to a valid binding.
  910. switch (paramCount)
  911. {
  912. case 1:
  913. {
  914. if ((lua_type(state, 1) == LUA_TUSERDATA))
  915. {
  916. Transform* instance = getInstance(state);
  917. void* returnPtr = (void*)new Vector3(instance->getDownVector());
  918. if (returnPtr)
  919. {
  920. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  921. object->instance = returnPtr;
  922. object->owns = true;
  923. luaL_getmetatable(state, "Vector3");
  924. lua_setmetatable(state, -2);
  925. }
  926. else
  927. {
  928. lua_pushnil(state);
  929. }
  930. return 1;
  931. }
  932. else
  933. {
  934. lua_pushstring(state, "lua_Transform_getDownVector - Failed to match the given parameters to a valid function signature.");
  935. lua_error(state);
  936. }
  937. break;
  938. }
  939. case 2:
  940. {
  941. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  942. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  943. {
  944. // Get parameter 1 off the stack.
  945. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  946. Transform* instance = getInstance(state);
  947. instance->getDownVector(param1);
  948. return 0;
  949. }
  950. else
  951. {
  952. lua_pushstring(state, "lua_Transform_getDownVector - Failed to match the given parameters to a valid function signature.");
  953. lua_error(state);
  954. }
  955. break;
  956. }
  957. default:
  958. {
  959. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  960. lua_error(state);
  961. break;
  962. }
  963. }
  964. return 0;
  965. }
  966. int lua_Transform_getForwardVector(lua_State* state)
  967. {
  968. // Get the number of parameters.
  969. int paramCount = lua_gettop(state);
  970. // Attempt to match the parameters to a valid binding.
  971. switch (paramCount)
  972. {
  973. case 1:
  974. {
  975. if ((lua_type(state, 1) == LUA_TUSERDATA))
  976. {
  977. Transform* instance = getInstance(state);
  978. void* returnPtr = (void*)new Vector3(instance->getForwardVector());
  979. if (returnPtr)
  980. {
  981. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  982. object->instance = returnPtr;
  983. object->owns = true;
  984. luaL_getmetatable(state, "Vector3");
  985. lua_setmetatable(state, -2);
  986. }
  987. else
  988. {
  989. lua_pushnil(state);
  990. }
  991. return 1;
  992. }
  993. else
  994. {
  995. lua_pushstring(state, "lua_Transform_getForwardVector - Failed to match the given parameters to a valid function signature.");
  996. lua_error(state);
  997. }
  998. break;
  999. }
  1000. case 2:
  1001. {
  1002. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1003. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1004. {
  1005. // Get parameter 1 off the stack.
  1006. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1007. Transform* instance = getInstance(state);
  1008. instance->getForwardVector(param1);
  1009. return 0;
  1010. }
  1011. else
  1012. {
  1013. lua_pushstring(state, "lua_Transform_getForwardVector - Failed to match the given parameters to a valid function signature.");
  1014. lua_error(state);
  1015. }
  1016. break;
  1017. }
  1018. default:
  1019. {
  1020. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1021. lua_error(state);
  1022. break;
  1023. }
  1024. }
  1025. return 0;
  1026. }
  1027. int lua_Transform_getLeftVector(lua_State* state)
  1028. {
  1029. // Get the number of parameters.
  1030. int paramCount = lua_gettop(state);
  1031. // Attempt to match the parameters to a valid binding.
  1032. switch (paramCount)
  1033. {
  1034. case 1:
  1035. {
  1036. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1037. {
  1038. Transform* instance = getInstance(state);
  1039. void* returnPtr = (void*)new Vector3(instance->getLeftVector());
  1040. if (returnPtr)
  1041. {
  1042. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1043. object->instance = returnPtr;
  1044. object->owns = true;
  1045. luaL_getmetatable(state, "Vector3");
  1046. lua_setmetatable(state, -2);
  1047. }
  1048. else
  1049. {
  1050. lua_pushnil(state);
  1051. }
  1052. return 1;
  1053. }
  1054. else
  1055. {
  1056. lua_pushstring(state, "lua_Transform_getLeftVector - Failed to match the given parameters to a valid function signature.");
  1057. lua_error(state);
  1058. }
  1059. break;
  1060. }
  1061. case 2:
  1062. {
  1063. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1064. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1065. {
  1066. // Get parameter 1 off the stack.
  1067. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1068. Transform* instance = getInstance(state);
  1069. instance->getLeftVector(param1);
  1070. return 0;
  1071. }
  1072. else
  1073. {
  1074. lua_pushstring(state, "lua_Transform_getLeftVector - Failed to match the given parameters to a valid function signature.");
  1075. lua_error(state);
  1076. }
  1077. break;
  1078. }
  1079. default:
  1080. {
  1081. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1082. lua_error(state);
  1083. break;
  1084. }
  1085. }
  1086. return 0;
  1087. }
  1088. int lua_Transform_getMatrix(lua_State* state)
  1089. {
  1090. // Get the number of parameters.
  1091. int paramCount = lua_gettop(state);
  1092. // Attempt to match the parameters to a valid binding.
  1093. switch (paramCount)
  1094. {
  1095. case 1:
  1096. {
  1097. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1098. {
  1099. Transform* instance = getInstance(state);
  1100. void* returnPtr = (void*)&(instance->getMatrix());
  1101. if (returnPtr)
  1102. {
  1103. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1104. object->instance = returnPtr;
  1105. object->owns = false;
  1106. luaL_getmetatable(state, "Matrix");
  1107. lua_setmetatable(state, -2);
  1108. }
  1109. else
  1110. {
  1111. lua_pushnil(state);
  1112. }
  1113. return 1;
  1114. }
  1115. else
  1116. {
  1117. lua_pushstring(state, "lua_Transform_getMatrix - Failed to match the given parameters to a valid function signature.");
  1118. lua_error(state);
  1119. }
  1120. break;
  1121. }
  1122. default:
  1123. {
  1124. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1125. lua_error(state);
  1126. break;
  1127. }
  1128. }
  1129. return 0;
  1130. }
  1131. int lua_Transform_getRightVector(lua_State* state)
  1132. {
  1133. // Get the number of parameters.
  1134. int paramCount = lua_gettop(state);
  1135. // Attempt to match the parameters to a valid binding.
  1136. switch (paramCount)
  1137. {
  1138. case 1:
  1139. {
  1140. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1141. {
  1142. Transform* instance = getInstance(state);
  1143. void* returnPtr = (void*)new Vector3(instance->getRightVector());
  1144. if (returnPtr)
  1145. {
  1146. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1147. object->instance = returnPtr;
  1148. object->owns = true;
  1149. luaL_getmetatable(state, "Vector3");
  1150. lua_setmetatable(state, -2);
  1151. }
  1152. else
  1153. {
  1154. lua_pushnil(state);
  1155. }
  1156. return 1;
  1157. }
  1158. else
  1159. {
  1160. lua_pushstring(state, "lua_Transform_getRightVector - Failed to match the given parameters to a valid function signature.");
  1161. lua_error(state);
  1162. }
  1163. break;
  1164. }
  1165. case 2:
  1166. {
  1167. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1168. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1169. {
  1170. // Get parameter 1 off the stack.
  1171. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1172. Transform* instance = getInstance(state);
  1173. instance->getRightVector(param1);
  1174. return 0;
  1175. }
  1176. else
  1177. {
  1178. lua_pushstring(state, "lua_Transform_getRightVector - Failed to match the given parameters to a valid function signature.");
  1179. lua_error(state);
  1180. }
  1181. break;
  1182. }
  1183. default:
  1184. {
  1185. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1186. lua_error(state);
  1187. break;
  1188. }
  1189. }
  1190. return 0;
  1191. }
  1192. int lua_Transform_getRotation(lua_State* state)
  1193. {
  1194. // Get the number of parameters.
  1195. int paramCount = lua_gettop(state);
  1196. // Attempt to match the parameters to a valid binding.
  1197. switch (paramCount)
  1198. {
  1199. case 1:
  1200. {
  1201. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1202. {
  1203. Transform* instance = getInstance(state);
  1204. void* returnPtr = (void*)&(instance->getRotation());
  1205. if (returnPtr)
  1206. {
  1207. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1208. object->instance = returnPtr;
  1209. object->owns = false;
  1210. luaL_getmetatable(state, "Quaternion");
  1211. lua_setmetatable(state, -2);
  1212. }
  1213. else
  1214. {
  1215. lua_pushnil(state);
  1216. }
  1217. return 1;
  1218. }
  1219. else
  1220. {
  1221. lua_pushstring(state, "lua_Transform_getRotation - Failed to match the given parameters to a valid function signature.");
  1222. lua_error(state);
  1223. }
  1224. break;
  1225. }
  1226. case 2:
  1227. {
  1228. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1229. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1230. {
  1231. // Get parameter 1 off the stack.
  1232. ScriptUtil::LuaArray<Quaternion> param1 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", false);
  1233. Transform* instance = getInstance(state);
  1234. instance->getRotation(param1);
  1235. return 0;
  1236. }
  1237. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1238. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1239. {
  1240. // Get parameter 1 off the stack.
  1241. ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false);
  1242. Transform* instance = getInstance(state);
  1243. instance->getRotation(param1);
  1244. return 0;
  1245. }
  1246. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1247. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1248. {
  1249. // Get parameter 1 off the stack.
  1250. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1251. Transform* instance = getInstance(state);
  1252. float result = instance->getRotation(param1);
  1253. // Push the return value onto the stack.
  1254. lua_pushnumber(state, result);
  1255. return 1;
  1256. }
  1257. else
  1258. {
  1259. lua_pushstring(state, "lua_Transform_getRotation - Failed to match the given parameters to a valid function signature.");
  1260. lua_error(state);
  1261. }
  1262. break;
  1263. }
  1264. default:
  1265. {
  1266. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1267. lua_error(state);
  1268. break;
  1269. }
  1270. }
  1271. return 0;
  1272. }
  1273. int lua_Transform_getScale(lua_State* state)
  1274. {
  1275. // Get the number of parameters.
  1276. int paramCount = lua_gettop(state);
  1277. // Attempt to match the parameters to a valid binding.
  1278. switch (paramCount)
  1279. {
  1280. case 1:
  1281. {
  1282. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1283. {
  1284. Transform* instance = getInstance(state);
  1285. void* returnPtr = (void*)&(instance->getScale());
  1286. if (returnPtr)
  1287. {
  1288. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1289. object->instance = returnPtr;
  1290. object->owns = false;
  1291. luaL_getmetatable(state, "Vector3");
  1292. lua_setmetatable(state, -2);
  1293. }
  1294. else
  1295. {
  1296. lua_pushnil(state);
  1297. }
  1298. return 1;
  1299. }
  1300. else
  1301. {
  1302. lua_pushstring(state, "lua_Transform_getScale - Failed to match the given parameters to a valid function signature.");
  1303. lua_error(state);
  1304. }
  1305. break;
  1306. }
  1307. case 2:
  1308. {
  1309. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1310. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1311. {
  1312. // Get parameter 1 off the stack.
  1313. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1314. Transform* instance = getInstance(state);
  1315. instance->getScale(param1);
  1316. return 0;
  1317. }
  1318. else
  1319. {
  1320. lua_pushstring(state, "lua_Transform_getScale - Failed to match the given parameters to a valid function signature.");
  1321. lua_error(state);
  1322. }
  1323. break;
  1324. }
  1325. default:
  1326. {
  1327. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1328. lua_error(state);
  1329. break;
  1330. }
  1331. }
  1332. return 0;
  1333. }
  1334. int lua_Transform_getScaleX(lua_State* state)
  1335. {
  1336. // Get the number of parameters.
  1337. int paramCount = lua_gettop(state);
  1338. // Attempt to match the parameters to a valid binding.
  1339. switch (paramCount)
  1340. {
  1341. case 1:
  1342. {
  1343. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1344. {
  1345. Transform* instance = getInstance(state);
  1346. float result = instance->getScaleX();
  1347. // Push the return value onto the stack.
  1348. lua_pushnumber(state, result);
  1349. return 1;
  1350. }
  1351. else
  1352. {
  1353. lua_pushstring(state, "lua_Transform_getScaleX - Failed to match the given parameters to a valid function signature.");
  1354. lua_error(state);
  1355. }
  1356. break;
  1357. }
  1358. default:
  1359. {
  1360. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1361. lua_error(state);
  1362. break;
  1363. }
  1364. }
  1365. return 0;
  1366. }
  1367. int lua_Transform_getScaleY(lua_State* state)
  1368. {
  1369. // Get the number of parameters.
  1370. int paramCount = lua_gettop(state);
  1371. // Attempt to match the parameters to a valid binding.
  1372. switch (paramCount)
  1373. {
  1374. case 1:
  1375. {
  1376. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1377. {
  1378. Transform* instance = getInstance(state);
  1379. float result = instance->getScaleY();
  1380. // Push the return value onto the stack.
  1381. lua_pushnumber(state, result);
  1382. return 1;
  1383. }
  1384. else
  1385. {
  1386. lua_pushstring(state, "lua_Transform_getScaleY - Failed to match the given parameters to a valid function signature.");
  1387. lua_error(state);
  1388. }
  1389. break;
  1390. }
  1391. default:
  1392. {
  1393. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1394. lua_error(state);
  1395. break;
  1396. }
  1397. }
  1398. return 0;
  1399. }
  1400. int lua_Transform_getScaleZ(lua_State* state)
  1401. {
  1402. // Get the number of parameters.
  1403. int paramCount = lua_gettop(state);
  1404. // Attempt to match the parameters to a valid binding.
  1405. switch (paramCount)
  1406. {
  1407. case 1:
  1408. {
  1409. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1410. {
  1411. Transform* instance = getInstance(state);
  1412. float result = instance->getScaleZ();
  1413. // Push the return value onto the stack.
  1414. lua_pushnumber(state, result);
  1415. return 1;
  1416. }
  1417. else
  1418. {
  1419. lua_pushstring(state, "lua_Transform_getScaleZ - Failed to match the given parameters to a valid function signature.");
  1420. lua_error(state);
  1421. }
  1422. break;
  1423. }
  1424. default:
  1425. {
  1426. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1427. lua_error(state);
  1428. break;
  1429. }
  1430. }
  1431. return 0;
  1432. }
  1433. int lua_Transform_getTranslation(lua_State* state)
  1434. {
  1435. // Get the number of parameters.
  1436. int paramCount = lua_gettop(state);
  1437. // Attempt to match the parameters to a valid binding.
  1438. switch (paramCount)
  1439. {
  1440. case 1:
  1441. {
  1442. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1443. {
  1444. Transform* instance = getInstance(state);
  1445. void* returnPtr = (void*)&(instance->getTranslation());
  1446. if (returnPtr)
  1447. {
  1448. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1449. object->instance = returnPtr;
  1450. object->owns = false;
  1451. luaL_getmetatable(state, "Vector3");
  1452. lua_setmetatable(state, -2);
  1453. }
  1454. else
  1455. {
  1456. lua_pushnil(state);
  1457. }
  1458. return 1;
  1459. }
  1460. else
  1461. {
  1462. lua_pushstring(state, "lua_Transform_getTranslation - Failed to match the given parameters to a valid function signature.");
  1463. lua_error(state);
  1464. }
  1465. break;
  1466. }
  1467. case 2:
  1468. {
  1469. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1470. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1471. {
  1472. // Get parameter 1 off the stack.
  1473. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1474. Transform* instance = getInstance(state);
  1475. instance->getTranslation(param1);
  1476. return 0;
  1477. }
  1478. else
  1479. {
  1480. lua_pushstring(state, "lua_Transform_getTranslation - Failed to match the given parameters to a valid function signature.");
  1481. lua_error(state);
  1482. }
  1483. break;
  1484. }
  1485. default:
  1486. {
  1487. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1488. lua_error(state);
  1489. break;
  1490. }
  1491. }
  1492. return 0;
  1493. }
  1494. int lua_Transform_getTranslationX(lua_State* state)
  1495. {
  1496. // Get the number of parameters.
  1497. int paramCount = lua_gettop(state);
  1498. // Attempt to match the parameters to a valid binding.
  1499. switch (paramCount)
  1500. {
  1501. case 1:
  1502. {
  1503. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1504. {
  1505. Transform* instance = getInstance(state);
  1506. float result = instance->getTranslationX();
  1507. // Push the return value onto the stack.
  1508. lua_pushnumber(state, result);
  1509. return 1;
  1510. }
  1511. else
  1512. {
  1513. lua_pushstring(state, "lua_Transform_getTranslationX - Failed to match the given parameters to a valid function signature.");
  1514. lua_error(state);
  1515. }
  1516. break;
  1517. }
  1518. default:
  1519. {
  1520. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1521. lua_error(state);
  1522. break;
  1523. }
  1524. }
  1525. return 0;
  1526. }
  1527. int lua_Transform_getTranslationY(lua_State* state)
  1528. {
  1529. // Get the number of parameters.
  1530. int paramCount = lua_gettop(state);
  1531. // Attempt to match the parameters to a valid binding.
  1532. switch (paramCount)
  1533. {
  1534. case 1:
  1535. {
  1536. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1537. {
  1538. Transform* instance = getInstance(state);
  1539. float result = instance->getTranslationY();
  1540. // Push the return value onto the stack.
  1541. lua_pushnumber(state, result);
  1542. return 1;
  1543. }
  1544. else
  1545. {
  1546. lua_pushstring(state, "lua_Transform_getTranslationY - Failed to match the given parameters to a valid function signature.");
  1547. lua_error(state);
  1548. }
  1549. break;
  1550. }
  1551. default:
  1552. {
  1553. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1554. lua_error(state);
  1555. break;
  1556. }
  1557. }
  1558. return 0;
  1559. }
  1560. int lua_Transform_getTranslationZ(lua_State* state)
  1561. {
  1562. // Get the number of parameters.
  1563. int paramCount = lua_gettop(state);
  1564. // Attempt to match the parameters to a valid binding.
  1565. switch (paramCount)
  1566. {
  1567. case 1:
  1568. {
  1569. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1570. {
  1571. Transform* instance = getInstance(state);
  1572. float result = instance->getTranslationZ();
  1573. // Push the return value onto the stack.
  1574. lua_pushnumber(state, result);
  1575. return 1;
  1576. }
  1577. else
  1578. {
  1579. lua_pushstring(state, "lua_Transform_getTranslationZ - Failed to match the given parameters to a valid function signature.");
  1580. lua_error(state);
  1581. }
  1582. break;
  1583. }
  1584. default:
  1585. {
  1586. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1587. lua_error(state);
  1588. break;
  1589. }
  1590. }
  1591. return 0;
  1592. }
  1593. int lua_Transform_getUpVector(lua_State* state)
  1594. {
  1595. // Get the number of parameters.
  1596. int paramCount = lua_gettop(state);
  1597. // Attempt to match the parameters to a valid binding.
  1598. switch (paramCount)
  1599. {
  1600. case 1:
  1601. {
  1602. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1603. {
  1604. Transform* instance = getInstance(state);
  1605. void* returnPtr = (void*)new Vector3(instance->getUpVector());
  1606. if (returnPtr)
  1607. {
  1608. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1609. object->instance = returnPtr;
  1610. object->owns = true;
  1611. luaL_getmetatable(state, "Vector3");
  1612. lua_setmetatable(state, -2);
  1613. }
  1614. else
  1615. {
  1616. lua_pushnil(state);
  1617. }
  1618. return 1;
  1619. }
  1620. else
  1621. {
  1622. lua_pushstring(state, "lua_Transform_getUpVector - Failed to match the given parameters to a valid function signature.");
  1623. lua_error(state);
  1624. }
  1625. break;
  1626. }
  1627. case 2:
  1628. {
  1629. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1630. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1631. {
  1632. // Get parameter 1 off the stack.
  1633. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1634. Transform* instance = getInstance(state);
  1635. instance->getUpVector(param1);
  1636. return 0;
  1637. }
  1638. else
  1639. {
  1640. lua_pushstring(state, "lua_Transform_getUpVector - Failed to match the given parameters to a valid function signature.");
  1641. lua_error(state);
  1642. }
  1643. break;
  1644. }
  1645. default:
  1646. {
  1647. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1648. lua_error(state);
  1649. break;
  1650. }
  1651. }
  1652. return 0;
  1653. }
  1654. int lua_Transform_removeListener(lua_State* state)
  1655. {
  1656. // Get the number of parameters.
  1657. int paramCount = lua_gettop(state);
  1658. // Attempt to match the parameters to a valid binding.
  1659. switch (paramCount)
  1660. {
  1661. case 2:
  1662. {
  1663. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1664. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1665. {
  1666. // Get parameter 1 off the stack.
  1667. ScriptUtil::LuaArray<Transform::Listener> param1 = ScriptUtil::getObjectPointer<Transform::Listener>(2, "TransformListener", false);
  1668. Transform* instance = getInstance(state);
  1669. instance->removeListener(param1);
  1670. return 0;
  1671. }
  1672. else
  1673. {
  1674. lua_pushstring(state, "lua_Transform_removeListener - Failed to match the given parameters to a valid function signature.");
  1675. lua_error(state);
  1676. }
  1677. break;
  1678. }
  1679. default:
  1680. {
  1681. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1682. lua_error(state);
  1683. break;
  1684. }
  1685. }
  1686. return 0;
  1687. }
  1688. int lua_Transform_removeScriptCallback(lua_State* state)
  1689. {
  1690. // Get the number of parameters.
  1691. int paramCount = lua_gettop(state);
  1692. // Attempt to match the parameters to a valid binding.
  1693. switch (paramCount)
  1694. {
  1695. case 3:
  1696. {
  1697. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1698. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  1699. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1700. {
  1701. // Get parameter 1 off the stack.
  1702. std::string param1 = ScriptUtil::getString(2, true);
  1703. // Get parameter 2 off the stack.
  1704. std::string param2 = ScriptUtil::getString(3, true);
  1705. Transform* instance = getInstance(state);
  1706. instance->removeScriptCallback(param1, param2);
  1707. return 0;
  1708. }
  1709. else
  1710. {
  1711. lua_pushstring(state, "lua_Transform_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  1712. lua_error(state);
  1713. }
  1714. break;
  1715. }
  1716. default:
  1717. {
  1718. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1719. lua_error(state);
  1720. break;
  1721. }
  1722. }
  1723. return 0;
  1724. }
  1725. int lua_Transform_rotate(lua_State* state)
  1726. {
  1727. // Get the number of parameters.
  1728. int paramCount = lua_gettop(state);
  1729. // Attempt to match the parameters to a valid binding.
  1730. switch (paramCount)
  1731. {
  1732. case 2:
  1733. {
  1734. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1735. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1736. {
  1737. // Get parameter 1 off the stack.
  1738. ScriptUtil::LuaArray<Quaternion> param1 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true);
  1739. Transform* instance = getInstance(state);
  1740. instance->rotate(*param1);
  1741. return 0;
  1742. }
  1743. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1744. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1745. {
  1746. // Get parameter 1 off the stack.
  1747. ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true);
  1748. Transform* instance = getInstance(state);
  1749. instance->rotate(*param1);
  1750. return 0;
  1751. }
  1752. else
  1753. {
  1754. lua_pushstring(state, "lua_Transform_rotate - Failed to match the given parameters to a valid function signature.");
  1755. lua_error(state);
  1756. }
  1757. break;
  1758. }
  1759. case 3:
  1760. {
  1761. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1762. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  1763. lua_type(state, 3) == LUA_TNUMBER)
  1764. {
  1765. // Get parameter 1 off the stack.
  1766. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  1767. // Get parameter 2 off the stack.
  1768. float param2 = (float)luaL_checknumber(state, 3);
  1769. Transform* instance = getInstance(state);
  1770. instance->rotate(*param1, param2);
  1771. return 0;
  1772. }
  1773. else
  1774. {
  1775. lua_pushstring(state, "lua_Transform_rotate - Failed to match the given parameters to a valid function signature.");
  1776. lua_error(state);
  1777. }
  1778. break;
  1779. }
  1780. case 5:
  1781. {
  1782. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1783. lua_type(state, 2) == LUA_TNUMBER &&
  1784. lua_type(state, 3) == LUA_TNUMBER &&
  1785. lua_type(state, 4) == LUA_TNUMBER &&
  1786. lua_type(state, 5) == LUA_TNUMBER)
  1787. {
  1788. // Get parameter 1 off the stack.
  1789. float param1 = (float)luaL_checknumber(state, 2);
  1790. // Get parameter 2 off the stack.
  1791. float param2 = (float)luaL_checknumber(state, 3);
  1792. // Get parameter 3 off the stack.
  1793. float param3 = (float)luaL_checknumber(state, 4);
  1794. // Get parameter 4 off the stack.
  1795. float param4 = (float)luaL_checknumber(state, 5);
  1796. Transform* instance = getInstance(state);
  1797. instance->rotate(param1, param2, param3, param4);
  1798. return 0;
  1799. }
  1800. else
  1801. {
  1802. lua_pushstring(state, "lua_Transform_rotate - Failed to match the given parameters to a valid function signature.");
  1803. lua_error(state);
  1804. }
  1805. break;
  1806. }
  1807. default:
  1808. {
  1809. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 5).");
  1810. lua_error(state);
  1811. break;
  1812. }
  1813. }
  1814. return 0;
  1815. }
  1816. int lua_Transform_rotateX(lua_State* state)
  1817. {
  1818. // Get the number of parameters.
  1819. int paramCount = lua_gettop(state);
  1820. // Attempt to match the parameters to a valid binding.
  1821. switch (paramCount)
  1822. {
  1823. case 2:
  1824. {
  1825. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1826. lua_type(state, 2) == LUA_TNUMBER)
  1827. {
  1828. // Get parameter 1 off the stack.
  1829. float param1 = (float)luaL_checknumber(state, 2);
  1830. Transform* instance = getInstance(state);
  1831. instance->rotateX(param1);
  1832. return 0;
  1833. }
  1834. else
  1835. {
  1836. lua_pushstring(state, "lua_Transform_rotateX - Failed to match the given parameters to a valid function signature.");
  1837. lua_error(state);
  1838. }
  1839. break;
  1840. }
  1841. default:
  1842. {
  1843. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1844. lua_error(state);
  1845. break;
  1846. }
  1847. }
  1848. return 0;
  1849. }
  1850. int lua_Transform_rotateY(lua_State* state)
  1851. {
  1852. // Get the number of parameters.
  1853. int paramCount = lua_gettop(state);
  1854. // Attempt to match the parameters to a valid binding.
  1855. switch (paramCount)
  1856. {
  1857. case 2:
  1858. {
  1859. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1860. lua_type(state, 2) == LUA_TNUMBER)
  1861. {
  1862. // Get parameter 1 off the stack.
  1863. float param1 = (float)luaL_checknumber(state, 2);
  1864. Transform* instance = getInstance(state);
  1865. instance->rotateY(param1);
  1866. return 0;
  1867. }
  1868. else
  1869. {
  1870. lua_pushstring(state, "lua_Transform_rotateY - Failed to match the given parameters to a valid function signature.");
  1871. lua_error(state);
  1872. }
  1873. break;
  1874. }
  1875. default:
  1876. {
  1877. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1878. lua_error(state);
  1879. break;
  1880. }
  1881. }
  1882. return 0;
  1883. }
  1884. int lua_Transform_rotateZ(lua_State* state)
  1885. {
  1886. // Get the number of parameters.
  1887. int paramCount = lua_gettop(state);
  1888. // Attempt to match the parameters to a valid binding.
  1889. switch (paramCount)
  1890. {
  1891. case 2:
  1892. {
  1893. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1894. lua_type(state, 2) == LUA_TNUMBER)
  1895. {
  1896. // Get parameter 1 off the stack.
  1897. float param1 = (float)luaL_checknumber(state, 2);
  1898. Transform* instance = getInstance(state);
  1899. instance->rotateZ(param1);
  1900. return 0;
  1901. }
  1902. else
  1903. {
  1904. lua_pushstring(state, "lua_Transform_rotateZ - Failed to match the given parameters to a valid function signature.");
  1905. lua_error(state);
  1906. }
  1907. break;
  1908. }
  1909. default:
  1910. {
  1911. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1912. lua_error(state);
  1913. break;
  1914. }
  1915. }
  1916. return 0;
  1917. }
  1918. int lua_Transform_scale(lua_State* state)
  1919. {
  1920. // Get the number of parameters.
  1921. int paramCount = lua_gettop(state);
  1922. // Attempt to match the parameters to a valid binding.
  1923. switch (paramCount)
  1924. {
  1925. case 2:
  1926. {
  1927. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1928. lua_type(state, 2) == LUA_TNUMBER)
  1929. {
  1930. // Get parameter 1 off the stack.
  1931. float param1 = (float)luaL_checknumber(state, 2);
  1932. Transform* instance = getInstance(state);
  1933. instance->scale(param1);
  1934. return 0;
  1935. }
  1936. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1937. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  1938. {
  1939. // Get parameter 1 off the stack.
  1940. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  1941. Transform* instance = getInstance(state);
  1942. instance->scale(*param1);
  1943. return 0;
  1944. }
  1945. else
  1946. {
  1947. lua_pushstring(state, "lua_Transform_scale - Failed to match the given parameters to a valid function signature.");
  1948. lua_error(state);
  1949. }
  1950. break;
  1951. }
  1952. case 4:
  1953. {
  1954. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1955. lua_type(state, 2) == LUA_TNUMBER &&
  1956. lua_type(state, 3) == LUA_TNUMBER &&
  1957. lua_type(state, 4) == LUA_TNUMBER)
  1958. {
  1959. // Get parameter 1 off the stack.
  1960. float param1 = (float)luaL_checknumber(state, 2);
  1961. // Get parameter 2 off the stack.
  1962. float param2 = (float)luaL_checknumber(state, 3);
  1963. // Get parameter 3 off the stack.
  1964. float param3 = (float)luaL_checknumber(state, 4);
  1965. Transform* instance = getInstance(state);
  1966. instance->scale(param1, param2, param3);
  1967. return 0;
  1968. }
  1969. else
  1970. {
  1971. lua_pushstring(state, "lua_Transform_scale - Failed to match the given parameters to a valid function signature.");
  1972. lua_error(state);
  1973. }
  1974. break;
  1975. }
  1976. default:
  1977. {
  1978. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  1979. lua_error(state);
  1980. break;
  1981. }
  1982. }
  1983. return 0;
  1984. }
  1985. int lua_Transform_scaleX(lua_State* state)
  1986. {
  1987. // Get the number of parameters.
  1988. int paramCount = lua_gettop(state);
  1989. // Attempt to match the parameters to a valid binding.
  1990. switch (paramCount)
  1991. {
  1992. case 2:
  1993. {
  1994. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1995. lua_type(state, 2) == LUA_TNUMBER)
  1996. {
  1997. // Get parameter 1 off the stack.
  1998. float param1 = (float)luaL_checknumber(state, 2);
  1999. Transform* instance = getInstance(state);
  2000. instance->scaleX(param1);
  2001. return 0;
  2002. }
  2003. else
  2004. {
  2005. lua_pushstring(state, "lua_Transform_scaleX - Failed to match the given parameters to a valid function signature.");
  2006. lua_error(state);
  2007. }
  2008. break;
  2009. }
  2010. default:
  2011. {
  2012. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2013. lua_error(state);
  2014. break;
  2015. }
  2016. }
  2017. return 0;
  2018. }
  2019. int lua_Transform_scaleY(lua_State* state)
  2020. {
  2021. // Get the number of parameters.
  2022. int paramCount = lua_gettop(state);
  2023. // Attempt to match the parameters to a valid binding.
  2024. switch (paramCount)
  2025. {
  2026. case 2:
  2027. {
  2028. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2029. lua_type(state, 2) == LUA_TNUMBER)
  2030. {
  2031. // Get parameter 1 off the stack.
  2032. float param1 = (float)luaL_checknumber(state, 2);
  2033. Transform* instance = getInstance(state);
  2034. instance->scaleY(param1);
  2035. return 0;
  2036. }
  2037. else
  2038. {
  2039. lua_pushstring(state, "lua_Transform_scaleY - Failed to match the given parameters to a valid function signature.");
  2040. lua_error(state);
  2041. }
  2042. break;
  2043. }
  2044. default:
  2045. {
  2046. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2047. lua_error(state);
  2048. break;
  2049. }
  2050. }
  2051. return 0;
  2052. }
  2053. int lua_Transform_scaleZ(lua_State* state)
  2054. {
  2055. // Get the number of parameters.
  2056. int paramCount = lua_gettop(state);
  2057. // Attempt to match the parameters to a valid binding.
  2058. switch (paramCount)
  2059. {
  2060. case 2:
  2061. {
  2062. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2063. lua_type(state, 2) == LUA_TNUMBER)
  2064. {
  2065. // Get parameter 1 off the stack.
  2066. float param1 = (float)luaL_checknumber(state, 2);
  2067. Transform* instance = getInstance(state);
  2068. instance->scaleZ(param1);
  2069. return 0;
  2070. }
  2071. else
  2072. {
  2073. lua_pushstring(state, "lua_Transform_scaleZ - Failed to match the given parameters to a valid function signature.");
  2074. lua_error(state);
  2075. }
  2076. break;
  2077. }
  2078. default:
  2079. {
  2080. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2081. lua_error(state);
  2082. break;
  2083. }
  2084. }
  2085. return 0;
  2086. }
  2087. int lua_Transform_set(lua_State* state)
  2088. {
  2089. // Get the number of parameters.
  2090. int paramCount = lua_gettop(state);
  2091. // Attempt to match the parameters to a valid binding.
  2092. switch (paramCount)
  2093. {
  2094. case 2:
  2095. {
  2096. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2097. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2098. {
  2099. // Get parameter 1 off the stack.
  2100. ScriptUtil::LuaArray<Transform> param1 = ScriptUtil::getObjectPointer<Transform>(2, "Transform", true);
  2101. Transform* instance = getInstance(state);
  2102. instance->set(*param1);
  2103. return 0;
  2104. }
  2105. else
  2106. {
  2107. lua_pushstring(state, "lua_Transform_set - Failed to match the given parameters to a valid function signature.");
  2108. lua_error(state);
  2109. }
  2110. break;
  2111. }
  2112. case 4:
  2113. {
  2114. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2115. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2116. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  2117. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
  2118. {
  2119. // Get parameter 1 off the stack.
  2120. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2121. // Get parameter 2 off the stack.
  2122. ScriptUtil::LuaArray<Quaternion> param2 = ScriptUtil::getObjectPointer<Quaternion>(3, "Quaternion", true);
  2123. // Get parameter 3 off the stack.
  2124. ScriptUtil::LuaArray<Vector3> param3 = ScriptUtil::getObjectPointer<Vector3>(4, "Vector3", true);
  2125. Transform* instance = getInstance(state);
  2126. instance->set(*param1, *param2, *param3);
  2127. return 0;
  2128. }
  2129. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2130. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2131. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  2132. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
  2133. {
  2134. // Get parameter 1 off the stack.
  2135. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2136. // Get parameter 2 off the stack.
  2137. ScriptUtil::LuaArray<Matrix> param2 = ScriptUtil::getObjectPointer<Matrix>(3, "Matrix", true);
  2138. // Get parameter 3 off the stack.
  2139. ScriptUtil::LuaArray<Vector3> param3 = ScriptUtil::getObjectPointer<Vector3>(4, "Vector3", true);
  2140. Transform* instance = getInstance(state);
  2141. instance->set(*param1, *param2, *param3);
  2142. return 0;
  2143. }
  2144. else
  2145. {
  2146. lua_pushstring(state, "lua_Transform_set - Failed to match the given parameters to a valid function signature.");
  2147. lua_error(state);
  2148. }
  2149. break;
  2150. }
  2151. case 5:
  2152. {
  2153. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2154. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2155. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  2156. lua_type(state, 4) == LUA_TNUMBER &&
  2157. (lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TNIL))
  2158. {
  2159. // Get parameter 1 off the stack.
  2160. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2161. // Get parameter 2 off the stack.
  2162. ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true);
  2163. // Get parameter 3 off the stack.
  2164. float param3 = (float)luaL_checknumber(state, 4);
  2165. // Get parameter 4 off the stack.
  2166. ScriptUtil::LuaArray<Vector3> param4 = ScriptUtil::getObjectPointer<Vector3>(5, "Vector3", true);
  2167. Transform* instance = getInstance(state);
  2168. instance->set(*param1, *param2, param3, *param4);
  2169. return 0;
  2170. }
  2171. else
  2172. {
  2173. lua_pushstring(state, "lua_Transform_set - Failed to match the given parameters to a valid function signature.");
  2174. lua_error(state);
  2175. }
  2176. break;
  2177. }
  2178. default:
  2179. {
  2180. lua_pushstring(state, "Invalid number of parameters (expected 2, 4 or 5).");
  2181. lua_error(state);
  2182. break;
  2183. }
  2184. }
  2185. return 0;
  2186. }
  2187. int lua_Transform_setAnimationPropertyValue(lua_State* state)
  2188. {
  2189. // Get the number of parameters.
  2190. int paramCount = lua_gettop(state);
  2191. // Attempt to match the parameters to a valid binding.
  2192. switch (paramCount)
  2193. {
  2194. case 3:
  2195. {
  2196. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2197. lua_type(state, 2) == LUA_TNUMBER &&
  2198. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2199. {
  2200. // Get parameter 1 off the stack.
  2201. int param1 = (int)luaL_checkint(state, 2);
  2202. // Get parameter 2 off the stack.
  2203. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2204. Transform* instance = getInstance(state);
  2205. instance->setAnimationPropertyValue(param1, param2);
  2206. return 0;
  2207. }
  2208. else
  2209. {
  2210. lua_pushstring(state, "lua_Transform_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2211. lua_error(state);
  2212. }
  2213. break;
  2214. }
  2215. case 4:
  2216. {
  2217. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2218. lua_type(state, 2) == LUA_TNUMBER &&
  2219. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  2220. lua_type(state, 4) == LUA_TNUMBER)
  2221. {
  2222. // Get parameter 1 off the stack.
  2223. int param1 = (int)luaL_checkint(state, 2);
  2224. // Get parameter 2 off the stack.
  2225. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  2226. // Get parameter 3 off the stack.
  2227. float param3 = (float)luaL_checknumber(state, 4);
  2228. Transform* instance = getInstance(state);
  2229. instance->setAnimationPropertyValue(param1, param2, param3);
  2230. return 0;
  2231. }
  2232. else
  2233. {
  2234. lua_pushstring(state, "lua_Transform_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  2235. lua_error(state);
  2236. }
  2237. break;
  2238. }
  2239. default:
  2240. {
  2241. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  2242. lua_error(state);
  2243. break;
  2244. }
  2245. }
  2246. return 0;
  2247. }
  2248. int lua_Transform_setIdentity(lua_State* state)
  2249. {
  2250. // Get the number of parameters.
  2251. int paramCount = lua_gettop(state);
  2252. // Attempt to match the parameters to a valid binding.
  2253. switch (paramCount)
  2254. {
  2255. case 1:
  2256. {
  2257. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2258. {
  2259. Transform* instance = getInstance(state);
  2260. instance->setIdentity();
  2261. return 0;
  2262. }
  2263. else
  2264. {
  2265. lua_pushstring(state, "lua_Transform_setIdentity - Failed to match the given parameters to a valid function signature.");
  2266. lua_error(state);
  2267. }
  2268. break;
  2269. }
  2270. default:
  2271. {
  2272. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2273. lua_error(state);
  2274. break;
  2275. }
  2276. }
  2277. return 0;
  2278. }
  2279. int lua_Transform_setRotation(lua_State* state)
  2280. {
  2281. // Get the number of parameters.
  2282. int paramCount = lua_gettop(state);
  2283. // Attempt to match the parameters to a valid binding.
  2284. switch (paramCount)
  2285. {
  2286. case 2:
  2287. {
  2288. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2289. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2290. {
  2291. // Get parameter 1 off the stack.
  2292. ScriptUtil::LuaArray<Quaternion> param1 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true);
  2293. Transform* instance = getInstance(state);
  2294. instance->setRotation(*param1);
  2295. return 0;
  2296. }
  2297. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2298. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2299. {
  2300. // Get parameter 1 off the stack.
  2301. ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true);
  2302. Transform* instance = getInstance(state);
  2303. instance->setRotation(*param1);
  2304. return 0;
  2305. }
  2306. else
  2307. {
  2308. lua_pushstring(state, "lua_Transform_setRotation - Failed to match the given parameters to a valid function signature.");
  2309. lua_error(state);
  2310. }
  2311. break;
  2312. }
  2313. case 3:
  2314. {
  2315. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2316. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2317. lua_type(state, 3) == LUA_TNUMBER)
  2318. {
  2319. // Get parameter 1 off the stack.
  2320. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2321. // Get parameter 2 off the stack.
  2322. float param2 = (float)luaL_checknumber(state, 3);
  2323. Transform* instance = getInstance(state);
  2324. instance->setRotation(*param1, param2);
  2325. return 0;
  2326. }
  2327. else
  2328. {
  2329. lua_pushstring(state, "lua_Transform_setRotation - Failed to match the given parameters to a valid function signature.");
  2330. lua_error(state);
  2331. }
  2332. break;
  2333. }
  2334. case 5:
  2335. {
  2336. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2337. lua_type(state, 2) == LUA_TNUMBER &&
  2338. lua_type(state, 3) == LUA_TNUMBER &&
  2339. lua_type(state, 4) == LUA_TNUMBER &&
  2340. lua_type(state, 5) == LUA_TNUMBER)
  2341. {
  2342. // Get parameter 1 off the stack.
  2343. float param1 = (float)luaL_checknumber(state, 2);
  2344. // Get parameter 2 off the stack.
  2345. float param2 = (float)luaL_checknumber(state, 3);
  2346. // Get parameter 3 off the stack.
  2347. float param3 = (float)luaL_checknumber(state, 4);
  2348. // Get parameter 4 off the stack.
  2349. float param4 = (float)luaL_checknumber(state, 5);
  2350. Transform* instance = getInstance(state);
  2351. instance->setRotation(param1, param2, param3, param4);
  2352. return 0;
  2353. }
  2354. else
  2355. {
  2356. lua_pushstring(state, "lua_Transform_setRotation - Failed to match the given parameters to a valid function signature.");
  2357. lua_error(state);
  2358. }
  2359. break;
  2360. }
  2361. default:
  2362. {
  2363. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 5).");
  2364. lua_error(state);
  2365. break;
  2366. }
  2367. }
  2368. return 0;
  2369. }
  2370. int lua_Transform_setScale(lua_State* state)
  2371. {
  2372. // Get the number of parameters.
  2373. int paramCount = lua_gettop(state);
  2374. // Attempt to match the parameters to a valid binding.
  2375. switch (paramCount)
  2376. {
  2377. case 2:
  2378. {
  2379. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2380. lua_type(state, 2) == LUA_TNUMBER)
  2381. {
  2382. // Get parameter 1 off the stack.
  2383. float param1 = (float)luaL_checknumber(state, 2);
  2384. Transform* instance = getInstance(state);
  2385. instance->setScale(param1);
  2386. return 0;
  2387. }
  2388. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2389. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2390. {
  2391. // Get parameter 1 off the stack.
  2392. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2393. Transform* instance = getInstance(state);
  2394. instance->setScale(*param1);
  2395. return 0;
  2396. }
  2397. else
  2398. {
  2399. lua_pushstring(state, "lua_Transform_setScale - Failed to match the given parameters to a valid function signature.");
  2400. lua_error(state);
  2401. }
  2402. break;
  2403. }
  2404. case 4:
  2405. {
  2406. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2407. lua_type(state, 2) == LUA_TNUMBER &&
  2408. lua_type(state, 3) == LUA_TNUMBER &&
  2409. lua_type(state, 4) == LUA_TNUMBER)
  2410. {
  2411. // Get parameter 1 off the stack.
  2412. float param1 = (float)luaL_checknumber(state, 2);
  2413. // Get parameter 2 off the stack.
  2414. float param2 = (float)luaL_checknumber(state, 3);
  2415. // Get parameter 3 off the stack.
  2416. float param3 = (float)luaL_checknumber(state, 4);
  2417. Transform* instance = getInstance(state);
  2418. instance->setScale(param1, param2, param3);
  2419. return 0;
  2420. }
  2421. else
  2422. {
  2423. lua_pushstring(state, "lua_Transform_setScale - Failed to match the given parameters to a valid function signature.");
  2424. lua_error(state);
  2425. }
  2426. break;
  2427. }
  2428. default:
  2429. {
  2430. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  2431. lua_error(state);
  2432. break;
  2433. }
  2434. }
  2435. return 0;
  2436. }
  2437. int lua_Transform_setScaleX(lua_State* state)
  2438. {
  2439. // Get the number of parameters.
  2440. int paramCount = lua_gettop(state);
  2441. // Attempt to match the parameters to a valid binding.
  2442. switch (paramCount)
  2443. {
  2444. case 2:
  2445. {
  2446. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2447. lua_type(state, 2) == LUA_TNUMBER)
  2448. {
  2449. // Get parameter 1 off the stack.
  2450. float param1 = (float)luaL_checknumber(state, 2);
  2451. Transform* instance = getInstance(state);
  2452. instance->setScaleX(param1);
  2453. return 0;
  2454. }
  2455. else
  2456. {
  2457. lua_pushstring(state, "lua_Transform_setScaleX - Failed to match the given parameters to a valid function signature.");
  2458. lua_error(state);
  2459. }
  2460. break;
  2461. }
  2462. default:
  2463. {
  2464. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2465. lua_error(state);
  2466. break;
  2467. }
  2468. }
  2469. return 0;
  2470. }
  2471. int lua_Transform_setScaleY(lua_State* state)
  2472. {
  2473. // Get the number of parameters.
  2474. int paramCount = lua_gettop(state);
  2475. // Attempt to match the parameters to a valid binding.
  2476. switch (paramCount)
  2477. {
  2478. case 2:
  2479. {
  2480. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2481. lua_type(state, 2) == LUA_TNUMBER)
  2482. {
  2483. // Get parameter 1 off the stack.
  2484. float param1 = (float)luaL_checknumber(state, 2);
  2485. Transform* instance = getInstance(state);
  2486. instance->setScaleY(param1);
  2487. return 0;
  2488. }
  2489. else
  2490. {
  2491. lua_pushstring(state, "lua_Transform_setScaleY - Failed to match the given parameters to a valid function signature.");
  2492. lua_error(state);
  2493. }
  2494. break;
  2495. }
  2496. default:
  2497. {
  2498. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2499. lua_error(state);
  2500. break;
  2501. }
  2502. }
  2503. return 0;
  2504. }
  2505. int lua_Transform_setScaleZ(lua_State* state)
  2506. {
  2507. // Get the number of parameters.
  2508. int paramCount = lua_gettop(state);
  2509. // Attempt to match the parameters to a valid binding.
  2510. switch (paramCount)
  2511. {
  2512. case 2:
  2513. {
  2514. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2515. lua_type(state, 2) == LUA_TNUMBER)
  2516. {
  2517. // Get parameter 1 off the stack.
  2518. float param1 = (float)luaL_checknumber(state, 2);
  2519. Transform* instance = getInstance(state);
  2520. instance->setScaleZ(param1);
  2521. return 0;
  2522. }
  2523. else
  2524. {
  2525. lua_pushstring(state, "lua_Transform_setScaleZ - Failed to match the given parameters to a valid function signature.");
  2526. lua_error(state);
  2527. }
  2528. break;
  2529. }
  2530. default:
  2531. {
  2532. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2533. lua_error(state);
  2534. break;
  2535. }
  2536. }
  2537. return 0;
  2538. }
  2539. int lua_Transform_setTranslation(lua_State* state)
  2540. {
  2541. // Get the number of parameters.
  2542. int paramCount = lua_gettop(state);
  2543. // Attempt to match the parameters to a valid binding.
  2544. switch (paramCount)
  2545. {
  2546. case 2:
  2547. {
  2548. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2549. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  2550. {
  2551. // Get parameter 1 off the stack.
  2552. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2553. Transform* instance = getInstance(state);
  2554. instance->setTranslation(*param1);
  2555. return 0;
  2556. }
  2557. else
  2558. {
  2559. lua_pushstring(state, "lua_Transform_setTranslation - Failed to match the given parameters to a valid function signature.");
  2560. lua_error(state);
  2561. }
  2562. break;
  2563. }
  2564. case 4:
  2565. {
  2566. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2567. lua_type(state, 2) == LUA_TNUMBER &&
  2568. lua_type(state, 3) == LUA_TNUMBER &&
  2569. lua_type(state, 4) == LUA_TNUMBER)
  2570. {
  2571. // Get parameter 1 off the stack.
  2572. float param1 = (float)luaL_checknumber(state, 2);
  2573. // Get parameter 2 off the stack.
  2574. float param2 = (float)luaL_checknumber(state, 3);
  2575. // Get parameter 3 off the stack.
  2576. float param3 = (float)luaL_checknumber(state, 4);
  2577. Transform* instance = getInstance(state);
  2578. instance->setTranslation(param1, param2, param3);
  2579. return 0;
  2580. }
  2581. else
  2582. {
  2583. lua_pushstring(state, "lua_Transform_setTranslation - Failed to match the given parameters to a valid function signature.");
  2584. lua_error(state);
  2585. }
  2586. break;
  2587. }
  2588. default:
  2589. {
  2590. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  2591. lua_error(state);
  2592. break;
  2593. }
  2594. }
  2595. return 0;
  2596. }
  2597. int lua_Transform_setTranslationX(lua_State* state)
  2598. {
  2599. // Get the number of parameters.
  2600. int paramCount = lua_gettop(state);
  2601. // Attempt to match the parameters to a valid binding.
  2602. switch (paramCount)
  2603. {
  2604. case 2:
  2605. {
  2606. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2607. lua_type(state, 2) == LUA_TNUMBER)
  2608. {
  2609. // Get parameter 1 off the stack.
  2610. float param1 = (float)luaL_checknumber(state, 2);
  2611. Transform* instance = getInstance(state);
  2612. instance->setTranslationX(param1);
  2613. return 0;
  2614. }
  2615. else
  2616. {
  2617. lua_pushstring(state, "lua_Transform_setTranslationX - Failed to match the given parameters to a valid function signature.");
  2618. lua_error(state);
  2619. }
  2620. break;
  2621. }
  2622. default:
  2623. {
  2624. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2625. lua_error(state);
  2626. break;
  2627. }
  2628. }
  2629. return 0;
  2630. }
  2631. int lua_Transform_setTranslationY(lua_State* state)
  2632. {
  2633. // Get the number of parameters.
  2634. int paramCount = lua_gettop(state);
  2635. // Attempt to match the parameters to a valid binding.
  2636. switch (paramCount)
  2637. {
  2638. case 2:
  2639. {
  2640. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2641. lua_type(state, 2) == LUA_TNUMBER)
  2642. {
  2643. // Get parameter 1 off the stack.
  2644. float param1 = (float)luaL_checknumber(state, 2);
  2645. Transform* instance = getInstance(state);
  2646. instance->setTranslationY(param1);
  2647. return 0;
  2648. }
  2649. else
  2650. {
  2651. lua_pushstring(state, "lua_Transform_setTranslationY - Failed to match the given parameters to a valid function signature.");
  2652. lua_error(state);
  2653. }
  2654. break;
  2655. }
  2656. default:
  2657. {
  2658. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2659. lua_error(state);
  2660. break;
  2661. }
  2662. }
  2663. return 0;
  2664. }
  2665. int lua_Transform_setTranslationZ(lua_State* state)
  2666. {
  2667. // Get the number of parameters.
  2668. int paramCount = lua_gettop(state);
  2669. // Attempt to match the parameters to a valid binding.
  2670. switch (paramCount)
  2671. {
  2672. case 2:
  2673. {
  2674. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2675. lua_type(state, 2) == LUA_TNUMBER)
  2676. {
  2677. // Get parameter 1 off the stack.
  2678. float param1 = (float)luaL_checknumber(state, 2);
  2679. Transform* instance = getInstance(state);
  2680. instance->setTranslationZ(param1);
  2681. return 0;
  2682. }
  2683. else
  2684. {
  2685. lua_pushstring(state, "lua_Transform_setTranslationZ - Failed to match the given parameters to a valid function signature.");
  2686. lua_error(state);
  2687. }
  2688. break;
  2689. }
  2690. default:
  2691. {
  2692. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2693. lua_error(state);
  2694. break;
  2695. }
  2696. }
  2697. return 0;
  2698. }
  2699. int lua_Transform_static_ANIMATE_ROTATE(lua_State* state)
  2700. {
  2701. // Validate the number of parameters.
  2702. if (lua_gettop(state) > 0)
  2703. {
  2704. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2705. lua_error(state);
  2706. }
  2707. int result = Transform::ANIMATE_ROTATE;
  2708. // Push the return value onto the stack.
  2709. lua_pushinteger(state, result);
  2710. return 1;
  2711. }
  2712. int lua_Transform_static_ANIMATE_ROTATE_TRANSLATE(lua_State* state)
  2713. {
  2714. // Validate the number of parameters.
  2715. if (lua_gettop(state) > 0)
  2716. {
  2717. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2718. lua_error(state);
  2719. }
  2720. int result = Transform::ANIMATE_ROTATE_TRANSLATE;
  2721. // Push the return value onto the stack.
  2722. lua_pushinteger(state, result);
  2723. return 1;
  2724. }
  2725. int lua_Transform_static_ANIMATE_SCALE(lua_State* state)
  2726. {
  2727. // Validate the number of parameters.
  2728. if (lua_gettop(state) > 0)
  2729. {
  2730. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2731. lua_error(state);
  2732. }
  2733. int result = Transform::ANIMATE_SCALE;
  2734. // Push the return value onto the stack.
  2735. lua_pushinteger(state, result);
  2736. return 1;
  2737. }
  2738. int lua_Transform_static_ANIMATE_SCALE_ROTATE(lua_State* state)
  2739. {
  2740. // Validate the number of parameters.
  2741. if (lua_gettop(state) > 0)
  2742. {
  2743. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2744. lua_error(state);
  2745. }
  2746. int result = Transform::ANIMATE_SCALE_ROTATE;
  2747. // Push the return value onto the stack.
  2748. lua_pushinteger(state, result);
  2749. return 1;
  2750. }
  2751. int lua_Transform_static_ANIMATE_SCALE_ROTATE_TRANSLATE(lua_State* state)
  2752. {
  2753. // Validate the number of parameters.
  2754. if (lua_gettop(state) > 0)
  2755. {
  2756. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2757. lua_error(state);
  2758. }
  2759. int result = Transform::ANIMATE_SCALE_ROTATE_TRANSLATE;
  2760. // Push the return value onto the stack.
  2761. lua_pushinteger(state, result);
  2762. return 1;
  2763. }
  2764. int lua_Transform_static_ANIMATE_SCALE_TRANSLATE(lua_State* state)
  2765. {
  2766. // Validate the number of parameters.
  2767. if (lua_gettop(state) > 0)
  2768. {
  2769. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2770. lua_error(state);
  2771. }
  2772. int result = Transform::ANIMATE_SCALE_TRANSLATE;
  2773. // Push the return value onto the stack.
  2774. lua_pushinteger(state, result);
  2775. return 1;
  2776. }
  2777. int lua_Transform_static_ANIMATE_SCALE_UNIT(lua_State* state)
  2778. {
  2779. // Validate the number of parameters.
  2780. if (lua_gettop(state) > 0)
  2781. {
  2782. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2783. lua_error(state);
  2784. }
  2785. int result = Transform::ANIMATE_SCALE_UNIT;
  2786. // Push the return value onto the stack.
  2787. lua_pushinteger(state, result);
  2788. return 1;
  2789. }
  2790. int lua_Transform_static_ANIMATE_SCALE_X(lua_State* state)
  2791. {
  2792. // Validate the number of parameters.
  2793. if (lua_gettop(state) > 0)
  2794. {
  2795. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2796. lua_error(state);
  2797. }
  2798. int result = Transform::ANIMATE_SCALE_X;
  2799. // Push the return value onto the stack.
  2800. lua_pushinteger(state, result);
  2801. return 1;
  2802. }
  2803. int lua_Transform_static_ANIMATE_SCALE_Y(lua_State* state)
  2804. {
  2805. // Validate the number of parameters.
  2806. if (lua_gettop(state) > 0)
  2807. {
  2808. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2809. lua_error(state);
  2810. }
  2811. int result = Transform::ANIMATE_SCALE_Y;
  2812. // Push the return value onto the stack.
  2813. lua_pushinteger(state, result);
  2814. return 1;
  2815. }
  2816. int lua_Transform_static_ANIMATE_SCALE_Z(lua_State* state)
  2817. {
  2818. // Validate the number of parameters.
  2819. if (lua_gettop(state) > 0)
  2820. {
  2821. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2822. lua_error(state);
  2823. }
  2824. int result = Transform::ANIMATE_SCALE_Z;
  2825. // Push the return value onto the stack.
  2826. lua_pushinteger(state, result);
  2827. return 1;
  2828. }
  2829. int lua_Transform_static_ANIMATE_TRANSLATE(lua_State* state)
  2830. {
  2831. // Validate the number of parameters.
  2832. if (lua_gettop(state) > 0)
  2833. {
  2834. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2835. lua_error(state);
  2836. }
  2837. int result = Transform::ANIMATE_TRANSLATE;
  2838. // Push the return value onto the stack.
  2839. lua_pushinteger(state, result);
  2840. return 1;
  2841. }
  2842. int lua_Transform_static_ANIMATE_TRANSLATE_X(lua_State* state)
  2843. {
  2844. // Validate the number of parameters.
  2845. if (lua_gettop(state) > 0)
  2846. {
  2847. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2848. lua_error(state);
  2849. }
  2850. int result = Transform::ANIMATE_TRANSLATE_X;
  2851. // Push the return value onto the stack.
  2852. lua_pushinteger(state, result);
  2853. return 1;
  2854. }
  2855. int lua_Transform_static_ANIMATE_TRANSLATE_Y(lua_State* state)
  2856. {
  2857. // Validate the number of parameters.
  2858. if (lua_gettop(state) > 0)
  2859. {
  2860. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2861. lua_error(state);
  2862. }
  2863. int result = Transform::ANIMATE_TRANSLATE_Y;
  2864. // Push the return value onto the stack.
  2865. lua_pushinteger(state, result);
  2866. return 1;
  2867. }
  2868. int lua_Transform_static_ANIMATE_TRANSLATE_Z(lua_State* state)
  2869. {
  2870. // Validate the number of parameters.
  2871. if (lua_gettop(state) > 0)
  2872. {
  2873. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2874. lua_error(state);
  2875. }
  2876. int result = Transform::ANIMATE_TRANSLATE_Z;
  2877. // Push the return value onto the stack.
  2878. lua_pushinteger(state, result);
  2879. return 1;
  2880. }
  2881. int lua_Transform_static_isTransformChangedSuspended(lua_State* state)
  2882. {
  2883. // Get the number of parameters.
  2884. int paramCount = lua_gettop(state);
  2885. // Attempt to match the parameters to a valid binding.
  2886. switch (paramCount)
  2887. {
  2888. case 0:
  2889. {
  2890. bool result = Transform::isTransformChangedSuspended();
  2891. // Push the return value onto the stack.
  2892. lua_pushboolean(state, result);
  2893. return 1;
  2894. break;
  2895. }
  2896. default:
  2897. {
  2898. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2899. lua_error(state);
  2900. break;
  2901. }
  2902. }
  2903. return 0;
  2904. }
  2905. int lua_Transform_static_resumeTransformChanged(lua_State* state)
  2906. {
  2907. // Get the number of parameters.
  2908. int paramCount = lua_gettop(state);
  2909. // Attempt to match the parameters to a valid binding.
  2910. switch (paramCount)
  2911. {
  2912. case 0:
  2913. {
  2914. Transform::resumeTransformChanged();
  2915. return 0;
  2916. break;
  2917. }
  2918. default:
  2919. {
  2920. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2921. lua_error(state);
  2922. break;
  2923. }
  2924. }
  2925. return 0;
  2926. }
  2927. int lua_Transform_static_suspendTransformChanged(lua_State* state)
  2928. {
  2929. // Get the number of parameters.
  2930. int paramCount = lua_gettop(state);
  2931. // Attempt to match the parameters to a valid binding.
  2932. switch (paramCount)
  2933. {
  2934. case 0:
  2935. {
  2936. Transform::suspendTransformChanged();
  2937. return 0;
  2938. break;
  2939. }
  2940. default:
  2941. {
  2942. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  2943. lua_error(state);
  2944. break;
  2945. }
  2946. }
  2947. return 0;
  2948. }
  2949. int lua_Transform_transformPoint(lua_State* state)
  2950. {
  2951. // Get the number of parameters.
  2952. int paramCount = lua_gettop(state);
  2953. // Attempt to match the parameters to a valid binding.
  2954. switch (paramCount)
  2955. {
  2956. case 2:
  2957. {
  2958. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2959. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2960. {
  2961. // Get parameter 1 off the stack.
  2962. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  2963. Transform* instance = getInstance(state);
  2964. instance->transformPoint(param1);
  2965. return 0;
  2966. }
  2967. else
  2968. {
  2969. lua_pushstring(state, "lua_Transform_transformPoint - Failed to match the given parameters to a valid function signature.");
  2970. lua_error(state);
  2971. }
  2972. break;
  2973. }
  2974. case 3:
  2975. {
  2976. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2977. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  2978. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  2979. {
  2980. // Get parameter 1 off the stack.
  2981. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  2982. // Get parameter 2 off the stack.
  2983. ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", false);
  2984. Transform* instance = getInstance(state);
  2985. instance->transformPoint(*param1, param2);
  2986. return 0;
  2987. }
  2988. else
  2989. {
  2990. lua_pushstring(state, "lua_Transform_transformPoint - Failed to match the given parameters to a valid function signature.");
  2991. lua_error(state);
  2992. }
  2993. break;
  2994. }
  2995. default:
  2996. {
  2997. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  2998. lua_error(state);
  2999. break;
  3000. }
  3001. }
  3002. return 0;
  3003. }
  3004. int lua_Transform_transformVector(lua_State* state)
  3005. {
  3006. // Get the number of parameters.
  3007. int paramCount = lua_gettop(state);
  3008. // Attempt to match the parameters to a valid binding.
  3009. switch (paramCount)
  3010. {
  3011. case 2:
  3012. {
  3013. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3014. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3015. {
  3016. // Get parameter 1 off the stack.
  3017. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  3018. Transform* instance = getInstance(state);
  3019. instance->transformVector(param1);
  3020. return 0;
  3021. }
  3022. else
  3023. {
  3024. lua_pushstring(state, "lua_Transform_transformVector - Failed to match the given parameters to a valid function signature.");
  3025. lua_error(state);
  3026. }
  3027. break;
  3028. }
  3029. case 3:
  3030. {
  3031. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3032. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3033. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  3034. {
  3035. // Get parameter 1 off the stack.
  3036. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  3037. // Get parameter 2 off the stack.
  3038. ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", false);
  3039. Transform* instance = getInstance(state);
  3040. instance->transformVector(*param1, param2);
  3041. return 0;
  3042. }
  3043. else
  3044. {
  3045. lua_pushstring(state, "lua_Transform_transformVector - Failed to match the given parameters to a valid function signature.");
  3046. lua_error(state);
  3047. }
  3048. break;
  3049. }
  3050. case 6:
  3051. {
  3052. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3053. lua_type(state, 2) == LUA_TNUMBER &&
  3054. lua_type(state, 3) == LUA_TNUMBER &&
  3055. lua_type(state, 4) == LUA_TNUMBER &&
  3056. lua_type(state, 5) == LUA_TNUMBER &&
  3057. (lua_type(state, 6) == LUA_TUSERDATA || lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TNIL))
  3058. {
  3059. // Get parameter 1 off the stack.
  3060. float param1 = (float)luaL_checknumber(state, 2);
  3061. // Get parameter 2 off the stack.
  3062. float param2 = (float)luaL_checknumber(state, 3);
  3063. // Get parameter 3 off the stack.
  3064. float param3 = (float)luaL_checknumber(state, 4);
  3065. // Get parameter 4 off the stack.
  3066. float param4 = (float)luaL_checknumber(state, 5);
  3067. // Get parameter 5 off the stack.
  3068. ScriptUtil::LuaArray<Vector3> param5 = ScriptUtil::getObjectPointer<Vector3>(6, "Vector3", false);
  3069. Transform* instance = getInstance(state);
  3070. instance->transformVector(param1, param2, param3, param4, param5);
  3071. return 0;
  3072. }
  3073. else
  3074. {
  3075. lua_pushstring(state, "lua_Transform_transformVector - Failed to match the given parameters to a valid function signature.");
  3076. lua_error(state);
  3077. }
  3078. break;
  3079. }
  3080. default:
  3081. {
  3082. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 6).");
  3083. lua_error(state);
  3084. break;
  3085. }
  3086. }
  3087. return 0;
  3088. }
  3089. int lua_Transform_translate(lua_State* state)
  3090. {
  3091. // Get the number of parameters.
  3092. int paramCount = lua_gettop(state);
  3093. // Attempt to match the parameters to a valid binding.
  3094. switch (paramCount)
  3095. {
  3096. case 2:
  3097. {
  3098. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3099. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3100. {
  3101. // Get parameter 1 off the stack.
  3102. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  3103. Transform* instance = getInstance(state);
  3104. instance->translate(*param1);
  3105. return 0;
  3106. }
  3107. else
  3108. {
  3109. lua_pushstring(state, "lua_Transform_translate - Failed to match the given parameters to a valid function signature.");
  3110. lua_error(state);
  3111. }
  3112. break;
  3113. }
  3114. case 4:
  3115. {
  3116. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3117. lua_type(state, 2) == LUA_TNUMBER &&
  3118. lua_type(state, 3) == LUA_TNUMBER &&
  3119. lua_type(state, 4) == LUA_TNUMBER)
  3120. {
  3121. // Get parameter 1 off the stack.
  3122. float param1 = (float)luaL_checknumber(state, 2);
  3123. // Get parameter 2 off the stack.
  3124. float param2 = (float)luaL_checknumber(state, 3);
  3125. // Get parameter 3 off the stack.
  3126. float param3 = (float)luaL_checknumber(state, 4);
  3127. Transform* instance = getInstance(state);
  3128. instance->translate(param1, param2, param3);
  3129. return 0;
  3130. }
  3131. else
  3132. {
  3133. lua_pushstring(state, "lua_Transform_translate - Failed to match the given parameters to a valid function signature.");
  3134. lua_error(state);
  3135. }
  3136. break;
  3137. }
  3138. default:
  3139. {
  3140. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  3141. lua_error(state);
  3142. break;
  3143. }
  3144. }
  3145. return 0;
  3146. }
  3147. int lua_Transform_translateForward(lua_State* state)
  3148. {
  3149. // Get the number of parameters.
  3150. int paramCount = lua_gettop(state);
  3151. // Attempt to match the parameters to a valid binding.
  3152. switch (paramCount)
  3153. {
  3154. case 2:
  3155. {
  3156. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3157. lua_type(state, 2) == LUA_TNUMBER)
  3158. {
  3159. // Get parameter 1 off the stack.
  3160. float param1 = (float)luaL_checknumber(state, 2);
  3161. Transform* instance = getInstance(state);
  3162. instance->translateForward(param1);
  3163. return 0;
  3164. }
  3165. else
  3166. {
  3167. lua_pushstring(state, "lua_Transform_translateForward - Failed to match the given parameters to a valid function signature.");
  3168. lua_error(state);
  3169. }
  3170. break;
  3171. }
  3172. default:
  3173. {
  3174. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3175. lua_error(state);
  3176. break;
  3177. }
  3178. }
  3179. return 0;
  3180. }
  3181. int lua_Transform_translateLeft(lua_State* state)
  3182. {
  3183. // Get the number of parameters.
  3184. int paramCount = lua_gettop(state);
  3185. // Attempt to match the parameters to a valid binding.
  3186. switch (paramCount)
  3187. {
  3188. case 2:
  3189. {
  3190. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3191. lua_type(state, 2) == LUA_TNUMBER)
  3192. {
  3193. // Get parameter 1 off the stack.
  3194. float param1 = (float)luaL_checknumber(state, 2);
  3195. Transform* instance = getInstance(state);
  3196. instance->translateLeft(param1);
  3197. return 0;
  3198. }
  3199. else
  3200. {
  3201. lua_pushstring(state, "lua_Transform_translateLeft - Failed to match the given parameters to a valid function signature.");
  3202. lua_error(state);
  3203. }
  3204. break;
  3205. }
  3206. default:
  3207. {
  3208. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3209. lua_error(state);
  3210. break;
  3211. }
  3212. }
  3213. return 0;
  3214. }
  3215. int lua_Transform_translateSmooth(lua_State* state)
  3216. {
  3217. // Get the number of parameters.
  3218. int paramCount = lua_gettop(state);
  3219. // Attempt to match the parameters to a valid binding.
  3220. switch (paramCount)
  3221. {
  3222. case 4:
  3223. {
  3224. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3225. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3226. lua_type(state, 3) == LUA_TNUMBER &&
  3227. lua_type(state, 4) == LUA_TNUMBER)
  3228. {
  3229. // Get parameter 1 off the stack.
  3230. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  3231. // Get parameter 2 off the stack.
  3232. float param2 = (float)luaL_checknumber(state, 3);
  3233. // Get parameter 3 off the stack.
  3234. float param3 = (float)luaL_checknumber(state, 4);
  3235. Transform* instance = getInstance(state);
  3236. instance->translateSmooth(*param1, param2, param3);
  3237. return 0;
  3238. }
  3239. else
  3240. {
  3241. lua_pushstring(state, "lua_Transform_translateSmooth - Failed to match the given parameters to a valid function signature.");
  3242. lua_error(state);
  3243. }
  3244. break;
  3245. }
  3246. default:
  3247. {
  3248. lua_pushstring(state, "Invalid number of parameters (expected 4).");
  3249. lua_error(state);
  3250. break;
  3251. }
  3252. }
  3253. return 0;
  3254. }
  3255. int lua_Transform_translateUp(lua_State* state)
  3256. {
  3257. // Get the number of parameters.
  3258. int paramCount = lua_gettop(state);
  3259. // Attempt to match the parameters to a valid binding.
  3260. switch (paramCount)
  3261. {
  3262. case 2:
  3263. {
  3264. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3265. lua_type(state, 2) == LUA_TNUMBER)
  3266. {
  3267. // Get parameter 1 off the stack.
  3268. float param1 = (float)luaL_checknumber(state, 2);
  3269. Transform* instance = getInstance(state);
  3270. instance->translateUp(param1);
  3271. return 0;
  3272. }
  3273. else
  3274. {
  3275. lua_pushstring(state, "lua_Transform_translateUp - Failed to match the given parameters to a valid function signature.");
  3276. lua_error(state);
  3277. }
  3278. break;
  3279. }
  3280. default:
  3281. {
  3282. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3283. lua_error(state);
  3284. break;
  3285. }
  3286. }
  3287. return 0;
  3288. }
  3289. int lua_Transform_translateX(lua_State* state)
  3290. {
  3291. // Get the number of parameters.
  3292. int paramCount = lua_gettop(state);
  3293. // Attempt to match the parameters to a valid binding.
  3294. switch (paramCount)
  3295. {
  3296. case 2:
  3297. {
  3298. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3299. lua_type(state, 2) == LUA_TNUMBER)
  3300. {
  3301. // Get parameter 1 off the stack.
  3302. float param1 = (float)luaL_checknumber(state, 2);
  3303. Transform* instance = getInstance(state);
  3304. instance->translateX(param1);
  3305. return 0;
  3306. }
  3307. else
  3308. {
  3309. lua_pushstring(state, "lua_Transform_translateX - Failed to match the given parameters to a valid function signature.");
  3310. lua_error(state);
  3311. }
  3312. break;
  3313. }
  3314. default:
  3315. {
  3316. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3317. lua_error(state);
  3318. break;
  3319. }
  3320. }
  3321. return 0;
  3322. }
  3323. int lua_Transform_translateY(lua_State* state)
  3324. {
  3325. // Get the number of parameters.
  3326. int paramCount = lua_gettop(state);
  3327. // Attempt to match the parameters to a valid binding.
  3328. switch (paramCount)
  3329. {
  3330. case 2:
  3331. {
  3332. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3333. lua_type(state, 2) == LUA_TNUMBER)
  3334. {
  3335. // Get parameter 1 off the stack.
  3336. float param1 = (float)luaL_checknumber(state, 2);
  3337. Transform* instance = getInstance(state);
  3338. instance->translateY(param1);
  3339. return 0;
  3340. }
  3341. else
  3342. {
  3343. lua_pushstring(state, "lua_Transform_translateY - Failed to match the given parameters to a valid function signature.");
  3344. lua_error(state);
  3345. }
  3346. break;
  3347. }
  3348. default:
  3349. {
  3350. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3351. lua_error(state);
  3352. break;
  3353. }
  3354. }
  3355. return 0;
  3356. }
  3357. int lua_Transform_translateZ(lua_State* state)
  3358. {
  3359. // Get the number of parameters.
  3360. int paramCount = lua_gettop(state);
  3361. // Attempt to match the parameters to a valid binding.
  3362. switch (paramCount)
  3363. {
  3364. case 2:
  3365. {
  3366. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3367. lua_type(state, 2) == LUA_TNUMBER)
  3368. {
  3369. // Get parameter 1 off the stack.
  3370. float param1 = (float)luaL_checknumber(state, 2);
  3371. Transform* instance = getInstance(state);
  3372. instance->translateZ(param1);
  3373. return 0;
  3374. }
  3375. else
  3376. {
  3377. lua_pushstring(state, "lua_Transform_translateZ - Failed to match the given parameters to a valid function signature.");
  3378. lua_error(state);
  3379. }
  3380. break;
  3381. }
  3382. default:
  3383. {
  3384. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3385. lua_error(state);
  3386. break;
  3387. }
  3388. }
  3389. return 0;
  3390. }
  3391. }