lua_Transform.cpp 126 KB

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