lua_Transform.cpp 140 KB

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