lua_Transform.cpp 139 KB

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