2
0

lua_Node.cpp 214 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594
  1. #include "Base.h"
  2. #include "ScriptController.h"
  3. #include "lua_Node.h"
  4. #include "Animation.h"
  5. #include "AnimationTarget.h"
  6. #include "AudioSource.h"
  7. #include "Base.h"
  8. #include "Game.h"
  9. #include "Joint.h"
  10. #include "Node.h"
  11. #include "PhysicsCharacter.h"
  12. #include "PhysicsGhostObject.h"
  13. #include "PhysicsRigidBody.h"
  14. #include "PhysicsVehicle.h"
  15. #include "PhysicsVehicleWheel.h"
  16. #include "Ref.h"
  17. #include "Scene.h"
  18. #include "ScriptController.h"
  19. #include "ScriptTarget.h"
  20. #include "Transform.h"
  21. #include "lua_CurveInterpolationType.h"
  22. #include "lua_NodeType.h"
  23. #include "lua_PhysicsCollisionObjectType.h"
  24. namespace gameplay
  25. {
  26. void luaRegister_Node()
  27. {
  28. const luaL_Reg lua_members[] =
  29. {
  30. {"addAdvertisedDescendant", lua_Node_addAdvertisedDescendant},
  31. {"addChild", lua_Node_addChild},
  32. {"addListener", lua_Node_addListener},
  33. {"addRef", lua_Node_addRef},
  34. {"addScriptCallback", lua_Node_addScriptCallback},
  35. {"clone", lua_Node_clone},
  36. {"createAnimation", lua_Node_createAnimation},
  37. {"createAnimationFromBy", lua_Node_createAnimationFromBy},
  38. {"createAnimationFromTo", lua_Node_createAnimationFromTo},
  39. {"destroyAnimation", lua_Node_destroyAnimation},
  40. {"findNode", lua_Node_findNode},
  41. {"getActiveCameraTranslationView", lua_Node_getActiveCameraTranslationView},
  42. {"getActiveCameraTranslationWorld", lua_Node_getActiveCameraTranslationWorld},
  43. {"getAdvertisedDescendant", lua_Node_getAdvertisedDescendant},
  44. {"getAgent", lua_Node_getAgent},
  45. {"getAnimation", lua_Node_getAnimation},
  46. {"getAnimationPropertyComponentCount", lua_Node_getAnimationPropertyComponentCount},
  47. {"getAnimationPropertyValue", lua_Node_getAnimationPropertyValue},
  48. {"getAudioSource", lua_Node_getAudioSource},
  49. {"getBackVector", lua_Node_getBackVector},
  50. {"getBoundingSphere", lua_Node_getBoundingSphere},
  51. {"getCamera", lua_Node_getCamera},
  52. {"getChildCount", lua_Node_getChildCount},
  53. {"getCollisionObject", lua_Node_getCollisionObject},
  54. {"getDownVector", lua_Node_getDownVector},
  55. {"getFirstChild", lua_Node_getFirstChild},
  56. {"getForm", lua_Node_getForm},
  57. {"getForwardVector", lua_Node_getForwardVector},
  58. {"getForwardVectorView", lua_Node_getForwardVectorView},
  59. {"getForwardVectorWorld", lua_Node_getForwardVectorWorld},
  60. {"getId", lua_Node_getId},
  61. {"getInverseTransposeWorldMatrix", lua_Node_getInverseTransposeWorldMatrix},
  62. {"getInverseTransposeWorldViewMatrix", lua_Node_getInverseTransposeWorldViewMatrix},
  63. {"getInverseViewMatrix", lua_Node_getInverseViewMatrix},
  64. {"getInverseViewProjectionMatrix", lua_Node_getInverseViewProjectionMatrix},
  65. {"getLeftVector", lua_Node_getLeftVector},
  66. {"getLight", lua_Node_getLight},
  67. {"getMatrix", lua_Node_getMatrix},
  68. {"getModel", lua_Node_getModel},
  69. {"getNextSibling", lua_Node_getNextSibling},
  70. {"getNumAdvertisedDescendants", lua_Node_getNumAdvertisedDescendants},
  71. {"getParent", lua_Node_getParent},
  72. {"getParticleEmitter", lua_Node_getParticleEmitter},
  73. {"getPreviousSibling", lua_Node_getPreviousSibling},
  74. {"getProjectionMatrix", lua_Node_getProjectionMatrix},
  75. {"getRefCount", lua_Node_getRefCount},
  76. {"getRightVector", lua_Node_getRightVector},
  77. {"getRightVectorWorld", lua_Node_getRightVectorWorld},
  78. {"getRootNode", lua_Node_getRootNode},
  79. {"getRotation", lua_Node_getRotation},
  80. {"getScale", lua_Node_getScale},
  81. {"getScaleX", lua_Node_getScaleX},
  82. {"getScaleY", lua_Node_getScaleY},
  83. {"getScaleZ", lua_Node_getScaleZ},
  84. {"getScene", lua_Node_getScene},
  85. {"getTag", lua_Node_getTag},
  86. {"getTranslation", lua_Node_getTranslation},
  87. {"getTranslationView", lua_Node_getTranslationView},
  88. {"getTranslationWorld", lua_Node_getTranslationWorld},
  89. {"getTranslationX", lua_Node_getTranslationX},
  90. {"getTranslationY", lua_Node_getTranslationY},
  91. {"getTranslationZ", lua_Node_getTranslationZ},
  92. {"getType", lua_Node_getType},
  93. {"getUpVector", lua_Node_getUpVector},
  94. {"getUpVectorWorld", lua_Node_getUpVectorWorld},
  95. {"getViewMatrix", lua_Node_getViewMatrix},
  96. {"getViewProjectionMatrix", lua_Node_getViewProjectionMatrix},
  97. {"getWorldMatrix", lua_Node_getWorldMatrix},
  98. {"getWorldViewMatrix", lua_Node_getWorldViewMatrix},
  99. {"getWorldViewProjectionMatrix", lua_Node_getWorldViewProjectionMatrix},
  100. {"hasTag", lua_Node_hasTag},
  101. {"release", lua_Node_release},
  102. {"removeAllChildren", lua_Node_removeAllChildren},
  103. {"removeChild", lua_Node_removeChild},
  104. {"removeListener", lua_Node_removeListener},
  105. {"removeScriptCallback", lua_Node_removeScriptCallback},
  106. {"rotate", lua_Node_rotate},
  107. {"rotateX", lua_Node_rotateX},
  108. {"rotateY", lua_Node_rotateY},
  109. {"rotateZ", lua_Node_rotateZ},
  110. {"scale", lua_Node_scale},
  111. {"scaleX", lua_Node_scaleX},
  112. {"scaleY", lua_Node_scaleY},
  113. {"scaleZ", lua_Node_scaleZ},
  114. {"set", lua_Node_set},
  115. {"setAgent", lua_Node_setAgent},
  116. {"setAnimationPropertyValue", lua_Node_setAnimationPropertyValue},
  117. {"setAudioSource", lua_Node_setAudioSource},
  118. {"setCamera", lua_Node_setCamera},
  119. {"setCollisionObject", lua_Node_setCollisionObject},
  120. {"setForm", lua_Node_setForm},
  121. {"setId", lua_Node_setId},
  122. {"setIdentity", lua_Node_setIdentity},
  123. {"setLight", lua_Node_setLight},
  124. {"setModel", lua_Node_setModel},
  125. {"setParticleEmitter", lua_Node_setParticleEmitter},
  126. {"setRotation", lua_Node_setRotation},
  127. {"setScale", lua_Node_setScale},
  128. {"setScaleX", lua_Node_setScaleX},
  129. {"setScaleY", lua_Node_setScaleY},
  130. {"setScaleZ", lua_Node_setScaleZ},
  131. {"setTag", lua_Node_setTag},
  132. {"setTranslation", lua_Node_setTranslation},
  133. {"setTranslationX", lua_Node_setTranslationX},
  134. {"setTranslationY", lua_Node_setTranslationY},
  135. {"setTranslationZ", lua_Node_setTranslationZ},
  136. {"transformPoint", lua_Node_transformPoint},
  137. {"transformVector", lua_Node_transformVector},
  138. {"translate", lua_Node_translate},
  139. {"translateForward", lua_Node_translateForward},
  140. {"translateLeft", lua_Node_translateLeft},
  141. {"translateSmooth", lua_Node_translateSmooth},
  142. {"translateUp", lua_Node_translateUp},
  143. {"translateX", lua_Node_translateX},
  144. {"translateY", lua_Node_translateY},
  145. {"translateZ", lua_Node_translateZ},
  146. {NULL, NULL}
  147. };
  148. const luaL_Reg lua_statics[] =
  149. {
  150. {"ANIMATE_ROTATE", lua_Node_static_ANIMATE_ROTATE},
  151. {"ANIMATE_ROTATE_TRANSLATE", lua_Node_static_ANIMATE_ROTATE_TRANSLATE},
  152. {"ANIMATE_SCALE", lua_Node_static_ANIMATE_SCALE},
  153. {"ANIMATE_SCALE_ROTATE", lua_Node_static_ANIMATE_SCALE_ROTATE},
  154. {"ANIMATE_SCALE_ROTATE_TRANSLATE", lua_Node_static_ANIMATE_SCALE_ROTATE_TRANSLATE},
  155. {"ANIMATE_SCALE_TRANSLATE", lua_Node_static_ANIMATE_SCALE_TRANSLATE},
  156. {"ANIMATE_SCALE_UNIT", lua_Node_static_ANIMATE_SCALE_UNIT},
  157. {"ANIMATE_SCALE_X", lua_Node_static_ANIMATE_SCALE_X},
  158. {"ANIMATE_SCALE_Y", lua_Node_static_ANIMATE_SCALE_Y},
  159. {"ANIMATE_SCALE_Z", lua_Node_static_ANIMATE_SCALE_Z},
  160. {"ANIMATE_TRANSLATE", lua_Node_static_ANIMATE_TRANSLATE},
  161. {"ANIMATE_TRANSLATE_X", lua_Node_static_ANIMATE_TRANSLATE_X},
  162. {"ANIMATE_TRANSLATE_Y", lua_Node_static_ANIMATE_TRANSLATE_Y},
  163. {"ANIMATE_TRANSLATE_Z", lua_Node_static_ANIMATE_TRANSLATE_Z},
  164. {"create", lua_Node_static_create},
  165. {"isTransformChangedSuspended", lua_Node_static_isTransformChangedSuspended},
  166. {"resumeTransformChanged", lua_Node_static_resumeTransformChanged},
  167. {"suspendTransformChanged", lua_Node_static_suspendTransformChanged},
  168. {NULL, NULL}
  169. };
  170. std::vector<std::string> scopePath;
  171. ScriptUtil::registerClass("Node", lua_members, NULL, lua_Node__gc, lua_statics, scopePath);
  172. }
  173. static Node* getInstance(lua_State* state)
  174. {
  175. void* userdata = luaL_checkudata(state, 1, "Node");
  176. luaL_argcheck(state, userdata != NULL, 1, "'Node' expected.");
  177. return (Node*)((ScriptUtil::LuaObject*)userdata)->instance;
  178. }
  179. int lua_Node__gc(lua_State* state)
  180. {
  181. // Get the number of parameters.
  182. int paramCount = lua_gettop(state);
  183. // Attempt to match the parameters to a valid binding.
  184. switch (paramCount)
  185. {
  186. case 1:
  187. {
  188. if ((lua_type(state, 1) == LUA_TUSERDATA))
  189. {
  190. void* userdata = luaL_checkudata(state, 1, "Node");
  191. luaL_argcheck(state, userdata != NULL, 1, "'Node' expected.");
  192. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)userdata;
  193. if (object->owns)
  194. {
  195. Node* instance = (Node*)object->instance;
  196. SAFE_RELEASE(instance);
  197. }
  198. return 0;
  199. }
  200. else
  201. {
  202. lua_pushstring(state, "lua_Node__gc - Failed to match the given parameters to a valid function signature.");
  203. lua_error(state);
  204. }
  205. break;
  206. }
  207. default:
  208. {
  209. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  210. lua_error(state);
  211. break;
  212. }
  213. }
  214. return 0;
  215. }
  216. int lua_Node_addAdvertisedDescendant(lua_State* state)
  217. {
  218. // Get the number of parameters.
  219. int paramCount = lua_gettop(state);
  220. // Attempt to match the parameters to a valid binding.
  221. switch (paramCount)
  222. {
  223. case 2:
  224. {
  225. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  226. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  227. {
  228. // Get parameter 1 off the stack.
  229. ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
  230. Node* instance = getInstance(state);
  231. instance->addAdvertisedDescendant(param1);
  232. return 0;
  233. }
  234. else
  235. {
  236. lua_pushstring(state, "lua_Node_addAdvertisedDescendant - Failed to match the given parameters to a valid function signature.");
  237. lua_error(state);
  238. }
  239. break;
  240. }
  241. default:
  242. {
  243. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  244. lua_error(state);
  245. break;
  246. }
  247. }
  248. return 0;
  249. }
  250. int lua_Node_addChild(lua_State* state)
  251. {
  252. // Get the number of parameters.
  253. int paramCount = lua_gettop(state);
  254. // Attempt to match the parameters to a valid binding.
  255. switch (paramCount)
  256. {
  257. case 2:
  258. {
  259. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  260. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  261. {
  262. // Get parameter 1 off the stack.
  263. ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
  264. Node* instance = getInstance(state);
  265. instance->addChild(param1);
  266. return 0;
  267. }
  268. else
  269. {
  270. lua_pushstring(state, "lua_Node_addChild - Failed to match the given parameters to a valid function signature.");
  271. lua_error(state);
  272. }
  273. break;
  274. }
  275. default:
  276. {
  277. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  278. lua_error(state);
  279. break;
  280. }
  281. }
  282. return 0;
  283. }
  284. int lua_Node_addListener(lua_State* state)
  285. {
  286. // Get the number of parameters.
  287. int paramCount = lua_gettop(state);
  288. // Attempt to match the parameters to a valid binding.
  289. switch (paramCount)
  290. {
  291. case 2:
  292. {
  293. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  294. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  295. {
  296. // Get parameter 1 off the stack.
  297. ScriptUtil::LuaArray<Transform::Listener> param1 = ScriptUtil::getObjectPointer<Transform::Listener>(2, "TransformListener", false);
  298. Node* instance = getInstance(state);
  299. instance->addListener(param1);
  300. return 0;
  301. }
  302. else
  303. {
  304. lua_pushstring(state, "lua_Node_addListener - Failed to match the given parameters to a valid function signature.");
  305. lua_error(state);
  306. }
  307. break;
  308. }
  309. case 3:
  310. {
  311. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  312. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  313. lua_type(state, 3) == LUA_TNUMBER)
  314. {
  315. // Get parameter 1 off the stack.
  316. ScriptUtil::LuaArray<Transform::Listener> param1 = ScriptUtil::getObjectPointer<Transform::Listener>(2, "TransformListener", false);
  317. // Get parameter 2 off the stack.
  318. long param2 = (long)luaL_checklong(state, 3);
  319. Node* instance = getInstance(state);
  320. instance->addListener(param1, param2);
  321. return 0;
  322. }
  323. else
  324. {
  325. lua_pushstring(state, "lua_Node_addListener - Failed to match the given parameters to a valid function signature.");
  326. lua_error(state);
  327. }
  328. break;
  329. }
  330. default:
  331. {
  332. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  333. lua_error(state);
  334. break;
  335. }
  336. }
  337. return 0;
  338. }
  339. int lua_Node_addRef(lua_State* state)
  340. {
  341. // Get the number of parameters.
  342. int paramCount = lua_gettop(state);
  343. // Attempt to match the parameters to a valid binding.
  344. switch (paramCount)
  345. {
  346. case 1:
  347. {
  348. if ((lua_type(state, 1) == LUA_TUSERDATA))
  349. {
  350. Node* instance = getInstance(state);
  351. instance->addRef();
  352. return 0;
  353. }
  354. else
  355. {
  356. lua_pushstring(state, "lua_Node_addRef - Failed to match the given parameters to a valid function signature.");
  357. lua_error(state);
  358. }
  359. break;
  360. }
  361. default:
  362. {
  363. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  364. lua_error(state);
  365. break;
  366. }
  367. }
  368. return 0;
  369. }
  370. int lua_Node_addScriptCallback(lua_State* state)
  371. {
  372. // Get the number of parameters.
  373. int paramCount = lua_gettop(state);
  374. // Attempt to match the parameters to a valid binding.
  375. switch (paramCount)
  376. {
  377. case 3:
  378. {
  379. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  380. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  381. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  382. {
  383. // Get parameter 1 off the stack.
  384. std::string param1 = ScriptUtil::getString(2, true);
  385. // Get parameter 2 off the stack.
  386. std::string param2 = ScriptUtil::getString(3, true);
  387. Node* instance = getInstance(state);
  388. instance->addScriptCallback(param1, param2);
  389. return 0;
  390. }
  391. else
  392. {
  393. lua_pushstring(state, "lua_Node_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  394. lua_error(state);
  395. }
  396. break;
  397. }
  398. default:
  399. {
  400. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  401. lua_error(state);
  402. break;
  403. }
  404. }
  405. return 0;
  406. }
  407. int lua_Node_clone(lua_State* state)
  408. {
  409. // Get the number of parameters.
  410. int paramCount = lua_gettop(state);
  411. // Attempt to match the parameters to a valid binding.
  412. switch (paramCount)
  413. {
  414. case 1:
  415. {
  416. if ((lua_type(state, 1) == LUA_TUSERDATA))
  417. {
  418. Node* instance = getInstance(state);
  419. void* returnPtr = (void*)instance->clone();
  420. if (returnPtr)
  421. {
  422. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  423. object->instance = returnPtr;
  424. object->owns = true;
  425. luaL_getmetatable(state, "Node");
  426. lua_setmetatable(state, -2);
  427. }
  428. else
  429. {
  430. lua_pushnil(state);
  431. }
  432. return 1;
  433. }
  434. else
  435. {
  436. lua_pushstring(state, "lua_Node_clone - Failed to match the given parameters to a valid function signature.");
  437. lua_error(state);
  438. }
  439. break;
  440. }
  441. default:
  442. {
  443. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  444. lua_error(state);
  445. break;
  446. }
  447. }
  448. return 0;
  449. }
  450. int lua_Node_createAnimation(lua_State* state)
  451. {
  452. // Get the number of parameters.
  453. int paramCount = lua_gettop(state);
  454. // Attempt to match the parameters to a valid binding.
  455. switch (paramCount)
  456. {
  457. case 3:
  458. {
  459. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  460. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  461. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  462. {
  463. // Get parameter 1 off the stack.
  464. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  465. // Get parameter 2 off the stack.
  466. ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
  467. Node* instance = getInstance(state);
  468. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  469. if (returnPtr)
  470. {
  471. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  472. object->instance = returnPtr;
  473. object->owns = false;
  474. luaL_getmetatable(state, "Animation");
  475. lua_setmetatable(state, -2);
  476. }
  477. else
  478. {
  479. lua_pushnil(state);
  480. }
  481. return 1;
  482. }
  483. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  484. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  485. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  486. {
  487. // Get parameter 1 off the stack.
  488. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  489. // Get parameter 2 off the stack.
  490. ScriptUtil::LuaArray<Properties> param2 = ScriptUtil::getObjectPointer<Properties>(3, "Properties", false);
  491. Node* instance = getInstance(state);
  492. void* returnPtr = (void*)instance->createAnimation(param1, param2);
  493. if (returnPtr)
  494. {
  495. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  496. object->instance = returnPtr;
  497. object->owns = false;
  498. luaL_getmetatable(state, "Animation");
  499. lua_setmetatable(state, -2);
  500. }
  501. else
  502. {
  503. lua_pushnil(state);
  504. }
  505. return 1;
  506. }
  507. else
  508. {
  509. lua_pushstring(state, "lua_Node_createAnimation - Failed to match the given parameters to a valid function signature.");
  510. lua_error(state);
  511. }
  512. break;
  513. }
  514. case 7:
  515. {
  516. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  517. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  518. lua_type(state, 3) == LUA_TNUMBER &&
  519. lua_type(state, 4) == LUA_TNUMBER &&
  520. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  521. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  522. (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
  523. {
  524. // Get parameter 1 off the stack.
  525. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  526. // Get parameter 2 off the stack.
  527. int param2 = (int)luaL_checkint(state, 3);
  528. // Get parameter 3 off the stack.
  529. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  530. // Get parameter 4 off the stack.
  531. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  532. // Get parameter 5 off the stack.
  533. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  534. // Get parameter 6 off the stack.
  535. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7));
  536. Node* instance = getInstance(state);
  537. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6);
  538. if (returnPtr)
  539. {
  540. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  541. object->instance = returnPtr;
  542. object->owns = false;
  543. luaL_getmetatable(state, "Animation");
  544. lua_setmetatable(state, -2);
  545. }
  546. else
  547. {
  548. lua_pushnil(state);
  549. }
  550. return 1;
  551. }
  552. else
  553. {
  554. lua_pushstring(state, "lua_Node_createAnimation - Failed to match the given parameters to a valid function signature.");
  555. lua_error(state);
  556. }
  557. break;
  558. }
  559. case 9:
  560. {
  561. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  562. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  563. lua_type(state, 3) == LUA_TNUMBER &&
  564. lua_type(state, 4) == LUA_TNUMBER &&
  565. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  566. (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) &&
  567. (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) &&
  568. (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) &&
  569. (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL))
  570. {
  571. // Get parameter 1 off the stack.
  572. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  573. // Get parameter 2 off the stack.
  574. int param2 = (int)luaL_checkint(state, 3);
  575. // Get parameter 3 off the stack.
  576. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
  577. // Get parameter 4 off the stack.
  578. ScriptUtil::LuaArray<unsigned int> param4 = ScriptUtil::getUnsignedIntPointer(5);
  579. // Get parameter 5 off the stack.
  580. ScriptUtil::LuaArray<float> param5 = ScriptUtil::getFloatPointer(6);
  581. // Get parameter 6 off the stack.
  582. ScriptUtil::LuaArray<float> param6 = ScriptUtil::getFloatPointer(7);
  583. // Get parameter 7 off the stack.
  584. ScriptUtil::LuaArray<float> param7 = ScriptUtil::getFloatPointer(8);
  585. // Get parameter 8 off the stack.
  586. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9));
  587. Node* instance = getInstance(state);
  588. void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8);
  589. if (returnPtr)
  590. {
  591. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  592. object->instance = returnPtr;
  593. object->owns = false;
  594. luaL_getmetatable(state, "Animation");
  595. lua_setmetatable(state, -2);
  596. }
  597. else
  598. {
  599. lua_pushnil(state);
  600. }
  601. return 1;
  602. }
  603. else
  604. {
  605. lua_pushstring(state, "lua_Node_createAnimation - Failed to match the given parameters to a valid function signature.");
  606. lua_error(state);
  607. }
  608. break;
  609. }
  610. default:
  611. {
  612. lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9).");
  613. lua_error(state);
  614. break;
  615. }
  616. }
  617. return 0;
  618. }
  619. int lua_Node_createAnimationFromBy(lua_State* state)
  620. {
  621. // Get the number of parameters.
  622. int paramCount = lua_gettop(state);
  623. // Attempt to match the parameters to a valid binding.
  624. switch (paramCount)
  625. {
  626. case 7:
  627. {
  628. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  629. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  630. lua_type(state, 3) == LUA_TNUMBER &&
  631. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  632. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  633. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  634. lua_type(state, 7) == LUA_TNUMBER)
  635. {
  636. // Get parameter 1 off the stack.
  637. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  638. // Get parameter 2 off the stack.
  639. int param2 = (int)luaL_checkint(state, 3);
  640. // Get parameter 3 off the stack.
  641. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  642. // Get parameter 4 off the stack.
  643. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  644. // Get parameter 5 off the stack.
  645. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  646. // Get parameter 6 off the stack.
  647. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  648. Node* instance = getInstance(state);
  649. void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6);
  650. if (returnPtr)
  651. {
  652. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  653. object->instance = returnPtr;
  654. object->owns = false;
  655. luaL_getmetatable(state, "Animation");
  656. lua_setmetatable(state, -2);
  657. }
  658. else
  659. {
  660. lua_pushnil(state);
  661. }
  662. return 1;
  663. }
  664. else
  665. {
  666. lua_pushstring(state, "lua_Node_createAnimationFromBy - Failed to match the given parameters to a valid function signature.");
  667. lua_error(state);
  668. }
  669. break;
  670. }
  671. default:
  672. {
  673. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  674. lua_error(state);
  675. break;
  676. }
  677. }
  678. return 0;
  679. }
  680. int lua_Node_createAnimationFromTo(lua_State* state)
  681. {
  682. // Get the number of parameters.
  683. int paramCount = lua_gettop(state);
  684. // Attempt to match the parameters to a valid binding.
  685. switch (paramCount)
  686. {
  687. case 7:
  688. {
  689. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  690. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  691. lua_type(state, 3) == LUA_TNUMBER &&
  692. (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) &&
  693. (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) &&
  694. (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) &&
  695. lua_type(state, 7) == LUA_TNUMBER)
  696. {
  697. // Get parameter 1 off the stack.
  698. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  699. // Get parameter 2 off the stack.
  700. int param2 = (int)luaL_checkint(state, 3);
  701. // Get parameter 3 off the stack.
  702. ScriptUtil::LuaArray<float> param3 = ScriptUtil::getFloatPointer(4);
  703. // Get parameter 4 off the stack.
  704. ScriptUtil::LuaArray<float> param4 = ScriptUtil::getFloatPointer(5);
  705. // Get parameter 5 off the stack.
  706. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6));
  707. // Get parameter 6 off the stack.
  708. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7);
  709. Node* instance = getInstance(state);
  710. void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6);
  711. if (returnPtr)
  712. {
  713. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  714. object->instance = returnPtr;
  715. object->owns = false;
  716. luaL_getmetatable(state, "Animation");
  717. lua_setmetatable(state, -2);
  718. }
  719. else
  720. {
  721. lua_pushnil(state);
  722. }
  723. return 1;
  724. }
  725. else
  726. {
  727. lua_pushstring(state, "lua_Node_createAnimationFromTo - Failed to match the given parameters to a valid function signature.");
  728. lua_error(state);
  729. }
  730. break;
  731. }
  732. default:
  733. {
  734. lua_pushstring(state, "Invalid number of parameters (expected 7).");
  735. lua_error(state);
  736. break;
  737. }
  738. }
  739. return 0;
  740. }
  741. int lua_Node_destroyAnimation(lua_State* state)
  742. {
  743. // Get the number of parameters.
  744. int paramCount = lua_gettop(state);
  745. // Attempt to match the parameters to a valid binding.
  746. switch (paramCount)
  747. {
  748. case 1:
  749. {
  750. if ((lua_type(state, 1) == LUA_TUSERDATA))
  751. {
  752. Node* instance = getInstance(state);
  753. instance->destroyAnimation();
  754. return 0;
  755. }
  756. else
  757. {
  758. lua_pushstring(state, "lua_Node_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  759. lua_error(state);
  760. }
  761. break;
  762. }
  763. case 2:
  764. {
  765. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  766. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  767. {
  768. // Get parameter 1 off the stack.
  769. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  770. Node* instance = getInstance(state);
  771. instance->destroyAnimation(param1);
  772. return 0;
  773. }
  774. else
  775. {
  776. lua_pushstring(state, "lua_Node_destroyAnimation - Failed to match the given parameters to a valid function signature.");
  777. lua_error(state);
  778. }
  779. break;
  780. }
  781. default:
  782. {
  783. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  784. lua_error(state);
  785. break;
  786. }
  787. }
  788. return 0;
  789. }
  790. int lua_Node_findNode(lua_State* state)
  791. {
  792. // Get the number of parameters.
  793. int paramCount = lua_gettop(state);
  794. // Attempt to match the parameters to a valid binding.
  795. switch (paramCount)
  796. {
  797. case 2:
  798. {
  799. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  800. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  801. {
  802. // Get parameter 1 off the stack.
  803. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  804. Node* instance = getInstance(state);
  805. void* returnPtr = (void*)instance->findNode(param1);
  806. if (returnPtr)
  807. {
  808. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  809. object->instance = returnPtr;
  810. object->owns = false;
  811. luaL_getmetatable(state, "Node");
  812. lua_setmetatable(state, -2);
  813. }
  814. else
  815. {
  816. lua_pushnil(state);
  817. }
  818. return 1;
  819. }
  820. else
  821. {
  822. lua_pushstring(state, "lua_Node_findNode - Failed to match the given parameters to a valid function signature.");
  823. lua_error(state);
  824. }
  825. break;
  826. }
  827. case 3:
  828. {
  829. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  830. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  831. lua_type(state, 3) == LUA_TBOOLEAN)
  832. {
  833. // Get parameter 1 off the stack.
  834. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  835. // Get parameter 2 off the stack.
  836. bool param2 = ScriptUtil::luaCheckBool(state, 3);
  837. Node* instance = getInstance(state);
  838. void* returnPtr = (void*)instance->findNode(param1, param2);
  839. if (returnPtr)
  840. {
  841. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  842. object->instance = returnPtr;
  843. object->owns = false;
  844. luaL_getmetatable(state, "Node");
  845. lua_setmetatable(state, -2);
  846. }
  847. else
  848. {
  849. lua_pushnil(state);
  850. }
  851. return 1;
  852. }
  853. else
  854. {
  855. lua_pushstring(state, "lua_Node_findNode - Failed to match the given parameters to a valid function signature.");
  856. lua_error(state);
  857. }
  858. break;
  859. }
  860. case 4:
  861. {
  862. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  863. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  864. lua_type(state, 3) == LUA_TBOOLEAN &&
  865. lua_type(state, 4) == LUA_TBOOLEAN)
  866. {
  867. // Get parameter 1 off the stack.
  868. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  869. // Get parameter 2 off the stack.
  870. bool param2 = ScriptUtil::luaCheckBool(state, 3);
  871. // Get parameter 3 off the stack.
  872. bool param3 = ScriptUtil::luaCheckBool(state, 4);
  873. Node* instance = getInstance(state);
  874. void* returnPtr = (void*)instance->findNode(param1, param2, param3);
  875. if (returnPtr)
  876. {
  877. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  878. object->instance = returnPtr;
  879. object->owns = false;
  880. luaL_getmetatable(state, "Node");
  881. lua_setmetatable(state, -2);
  882. }
  883. else
  884. {
  885. lua_pushnil(state);
  886. }
  887. return 1;
  888. }
  889. else
  890. {
  891. lua_pushstring(state, "lua_Node_findNode - Failed to match the given parameters to a valid function signature.");
  892. lua_error(state);
  893. }
  894. break;
  895. }
  896. default:
  897. {
  898. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 4).");
  899. lua_error(state);
  900. break;
  901. }
  902. }
  903. return 0;
  904. }
  905. int lua_Node_getActiveCameraTranslationView(lua_State* state)
  906. {
  907. // Get the number of parameters.
  908. int paramCount = lua_gettop(state);
  909. // Attempt to match the parameters to a valid binding.
  910. switch (paramCount)
  911. {
  912. case 1:
  913. {
  914. if ((lua_type(state, 1) == LUA_TUSERDATA))
  915. {
  916. Node* instance = getInstance(state);
  917. void* returnPtr = (void*)new Vector3(instance->getActiveCameraTranslationView());
  918. if (returnPtr)
  919. {
  920. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  921. object->instance = returnPtr;
  922. object->owns = true;
  923. luaL_getmetatable(state, "Vector3");
  924. lua_setmetatable(state, -2);
  925. }
  926. else
  927. {
  928. lua_pushnil(state);
  929. }
  930. return 1;
  931. }
  932. else
  933. {
  934. lua_pushstring(state, "lua_Node_getActiveCameraTranslationView - Failed to match the given parameters to a valid function signature.");
  935. lua_error(state);
  936. }
  937. break;
  938. }
  939. default:
  940. {
  941. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  942. lua_error(state);
  943. break;
  944. }
  945. }
  946. return 0;
  947. }
  948. int lua_Node_getActiveCameraTranslationWorld(lua_State* state)
  949. {
  950. // Get the number of parameters.
  951. int paramCount = lua_gettop(state);
  952. // Attempt to match the parameters to a valid binding.
  953. switch (paramCount)
  954. {
  955. case 1:
  956. {
  957. if ((lua_type(state, 1) == LUA_TUSERDATA))
  958. {
  959. Node* instance = getInstance(state);
  960. void* returnPtr = (void*)new Vector3(instance->getActiveCameraTranslationWorld());
  961. if (returnPtr)
  962. {
  963. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  964. object->instance = returnPtr;
  965. object->owns = true;
  966. luaL_getmetatable(state, "Vector3");
  967. lua_setmetatable(state, -2);
  968. }
  969. else
  970. {
  971. lua_pushnil(state);
  972. }
  973. return 1;
  974. }
  975. else
  976. {
  977. lua_pushstring(state, "lua_Node_getActiveCameraTranslationWorld - Failed to match the given parameters to a valid function signature.");
  978. lua_error(state);
  979. }
  980. break;
  981. }
  982. default:
  983. {
  984. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  985. lua_error(state);
  986. break;
  987. }
  988. }
  989. return 0;
  990. }
  991. int lua_Node_getAdvertisedDescendant(lua_State* state)
  992. {
  993. // Get the number of parameters.
  994. int paramCount = lua_gettop(state);
  995. // Attempt to match the parameters to a valid binding.
  996. switch (paramCount)
  997. {
  998. case 2:
  999. {
  1000. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1001. lua_type(state, 2) == LUA_TNUMBER)
  1002. {
  1003. // Get parameter 1 off the stack.
  1004. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2);
  1005. Node* instance = getInstance(state);
  1006. void* returnPtr = (void*)instance->getAdvertisedDescendant(param1);
  1007. if (returnPtr)
  1008. {
  1009. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1010. object->instance = returnPtr;
  1011. object->owns = false;
  1012. luaL_getmetatable(state, "Node");
  1013. lua_setmetatable(state, -2);
  1014. }
  1015. else
  1016. {
  1017. lua_pushnil(state);
  1018. }
  1019. return 1;
  1020. }
  1021. else
  1022. {
  1023. lua_pushstring(state, "lua_Node_getAdvertisedDescendant - Failed to match the given parameters to a valid function signature.");
  1024. lua_error(state);
  1025. }
  1026. break;
  1027. }
  1028. default:
  1029. {
  1030. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1031. lua_error(state);
  1032. break;
  1033. }
  1034. }
  1035. return 0;
  1036. }
  1037. int lua_Node_getAgent(lua_State* state)
  1038. {
  1039. // Get the number of parameters.
  1040. int paramCount = lua_gettop(state);
  1041. // Attempt to match the parameters to a valid binding.
  1042. switch (paramCount)
  1043. {
  1044. case 1:
  1045. {
  1046. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1047. {
  1048. Node* instance = getInstance(state);
  1049. void* returnPtr = (void*)instance->getAgent();
  1050. if (returnPtr)
  1051. {
  1052. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1053. object->instance = returnPtr;
  1054. object->owns = false;
  1055. luaL_getmetatable(state, "AIAgent");
  1056. lua_setmetatable(state, -2);
  1057. }
  1058. else
  1059. {
  1060. lua_pushnil(state);
  1061. }
  1062. return 1;
  1063. }
  1064. else
  1065. {
  1066. lua_pushstring(state, "lua_Node_getAgent - Failed to match the given parameters to a valid function signature.");
  1067. lua_error(state);
  1068. }
  1069. break;
  1070. }
  1071. default:
  1072. {
  1073. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1074. lua_error(state);
  1075. break;
  1076. }
  1077. }
  1078. return 0;
  1079. }
  1080. int lua_Node_getAnimation(lua_State* state)
  1081. {
  1082. // Get the number of parameters.
  1083. int paramCount = lua_gettop(state);
  1084. // Attempt to match the parameters to a valid binding.
  1085. switch (paramCount)
  1086. {
  1087. case 1:
  1088. {
  1089. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1090. {
  1091. Node* instance = getInstance(state);
  1092. void* returnPtr = (void*)instance->getAnimation();
  1093. if (returnPtr)
  1094. {
  1095. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1096. object->instance = returnPtr;
  1097. object->owns = false;
  1098. luaL_getmetatable(state, "Animation");
  1099. lua_setmetatable(state, -2);
  1100. }
  1101. else
  1102. {
  1103. lua_pushnil(state);
  1104. }
  1105. return 1;
  1106. }
  1107. else
  1108. {
  1109. lua_pushstring(state, "lua_Node_getAnimation - Failed to match the given parameters to a valid function signature.");
  1110. lua_error(state);
  1111. }
  1112. break;
  1113. }
  1114. case 2:
  1115. {
  1116. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1117. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1118. {
  1119. // Get parameter 1 off the stack.
  1120. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  1121. Node* instance = getInstance(state);
  1122. void* returnPtr = (void*)instance->getAnimation(param1);
  1123. if (returnPtr)
  1124. {
  1125. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1126. object->instance = returnPtr;
  1127. object->owns = false;
  1128. luaL_getmetatable(state, "Animation");
  1129. lua_setmetatable(state, -2);
  1130. }
  1131. else
  1132. {
  1133. lua_pushnil(state);
  1134. }
  1135. return 1;
  1136. }
  1137. else
  1138. {
  1139. lua_pushstring(state, "lua_Node_getAnimation - Failed to match the given parameters to a valid function signature.");
  1140. lua_error(state);
  1141. }
  1142. break;
  1143. }
  1144. default:
  1145. {
  1146. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1147. lua_error(state);
  1148. break;
  1149. }
  1150. }
  1151. return 0;
  1152. }
  1153. int lua_Node_getAnimationPropertyComponentCount(lua_State* state)
  1154. {
  1155. // Get the number of parameters.
  1156. int paramCount = lua_gettop(state);
  1157. // Attempt to match the parameters to a valid binding.
  1158. switch (paramCount)
  1159. {
  1160. case 2:
  1161. {
  1162. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1163. lua_type(state, 2) == LUA_TNUMBER)
  1164. {
  1165. // Get parameter 1 off the stack.
  1166. int param1 = (int)luaL_checkint(state, 2);
  1167. Node* instance = getInstance(state);
  1168. unsigned int result = instance->getAnimationPropertyComponentCount(param1);
  1169. // Push the return value onto the stack.
  1170. lua_pushunsigned(state, result);
  1171. return 1;
  1172. }
  1173. else
  1174. {
  1175. lua_pushstring(state, "lua_Node_getAnimationPropertyComponentCount - Failed to match the given parameters to a valid function signature.");
  1176. lua_error(state);
  1177. }
  1178. break;
  1179. }
  1180. default:
  1181. {
  1182. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1183. lua_error(state);
  1184. break;
  1185. }
  1186. }
  1187. return 0;
  1188. }
  1189. int lua_Node_getAnimationPropertyValue(lua_State* state)
  1190. {
  1191. // Get the number of parameters.
  1192. int paramCount = lua_gettop(state);
  1193. // Attempt to match the parameters to a valid binding.
  1194. switch (paramCount)
  1195. {
  1196. case 3:
  1197. {
  1198. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1199. lua_type(state, 2) == LUA_TNUMBER &&
  1200. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  1201. {
  1202. // Get parameter 1 off the stack.
  1203. int param1 = (int)luaL_checkint(state, 2);
  1204. // Get parameter 2 off the stack.
  1205. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  1206. Node* instance = getInstance(state);
  1207. instance->getAnimationPropertyValue(param1, param2);
  1208. return 0;
  1209. }
  1210. else
  1211. {
  1212. lua_pushstring(state, "lua_Node_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  1213. lua_error(state);
  1214. }
  1215. break;
  1216. }
  1217. default:
  1218. {
  1219. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1220. lua_error(state);
  1221. break;
  1222. }
  1223. }
  1224. return 0;
  1225. }
  1226. int lua_Node_getAudioSource(lua_State* state)
  1227. {
  1228. // Get the number of parameters.
  1229. int paramCount = lua_gettop(state);
  1230. // Attempt to match the parameters to a valid binding.
  1231. switch (paramCount)
  1232. {
  1233. case 1:
  1234. {
  1235. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1236. {
  1237. Node* instance = getInstance(state);
  1238. void* returnPtr = (void*)instance->getAudioSource();
  1239. if (returnPtr)
  1240. {
  1241. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1242. object->instance = returnPtr;
  1243. object->owns = false;
  1244. luaL_getmetatable(state, "AudioSource");
  1245. lua_setmetatable(state, -2);
  1246. }
  1247. else
  1248. {
  1249. lua_pushnil(state);
  1250. }
  1251. return 1;
  1252. }
  1253. else
  1254. {
  1255. lua_pushstring(state, "lua_Node_getAudioSource - Failed to match the given parameters to a valid function signature.");
  1256. lua_error(state);
  1257. }
  1258. break;
  1259. }
  1260. default:
  1261. {
  1262. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1263. lua_error(state);
  1264. break;
  1265. }
  1266. }
  1267. return 0;
  1268. }
  1269. int lua_Node_getBackVector(lua_State* state)
  1270. {
  1271. // Get the number of parameters.
  1272. int paramCount = lua_gettop(state);
  1273. // Attempt to match the parameters to a valid binding.
  1274. switch (paramCount)
  1275. {
  1276. case 1:
  1277. {
  1278. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1279. {
  1280. Node* instance = getInstance(state);
  1281. void* returnPtr = (void*)new Vector3(instance->getBackVector());
  1282. if (returnPtr)
  1283. {
  1284. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1285. object->instance = returnPtr;
  1286. object->owns = true;
  1287. luaL_getmetatable(state, "Vector3");
  1288. lua_setmetatable(state, -2);
  1289. }
  1290. else
  1291. {
  1292. lua_pushnil(state);
  1293. }
  1294. return 1;
  1295. }
  1296. else
  1297. {
  1298. lua_pushstring(state, "lua_Node_getBackVector - Failed to match the given parameters to a valid function signature.");
  1299. lua_error(state);
  1300. }
  1301. break;
  1302. }
  1303. case 2:
  1304. {
  1305. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1306. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1307. {
  1308. // Get parameter 1 off the stack.
  1309. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1310. Node* instance = getInstance(state);
  1311. instance->getBackVector(param1);
  1312. return 0;
  1313. }
  1314. else
  1315. {
  1316. lua_pushstring(state, "lua_Node_getBackVector - Failed to match the given parameters to a valid function signature.");
  1317. lua_error(state);
  1318. }
  1319. break;
  1320. }
  1321. default:
  1322. {
  1323. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1324. lua_error(state);
  1325. break;
  1326. }
  1327. }
  1328. return 0;
  1329. }
  1330. int lua_Node_getBoundingSphere(lua_State* state)
  1331. {
  1332. // Get the number of parameters.
  1333. int paramCount = lua_gettop(state);
  1334. // Attempt to match the parameters to a valid binding.
  1335. switch (paramCount)
  1336. {
  1337. case 1:
  1338. {
  1339. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1340. {
  1341. Node* instance = getInstance(state);
  1342. void* returnPtr = (void*)&(instance->getBoundingSphere());
  1343. if (returnPtr)
  1344. {
  1345. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1346. object->instance = returnPtr;
  1347. object->owns = false;
  1348. luaL_getmetatable(state, "BoundingSphere");
  1349. lua_setmetatable(state, -2);
  1350. }
  1351. else
  1352. {
  1353. lua_pushnil(state);
  1354. }
  1355. return 1;
  1356. }
  1357. else
  1358. {
  1359. lua_pushstring(state, "lua_Node_getBoundingSphere - Failed to match the given parameters to a valid function signature.");
  1360. lua_error(state);
  1361. }
  1362. break;
  1363. }
  1364. default:
  1365. {
  1366. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1367. lua_error(state);
  1368. break;
  1369. }
  1370. }
  1371. return 0;
  1372. }
  1373. int lua_Node_getCamera(lua_State* state)
  1374. {
  1375. // Get the number of parameters.
  1376. int paramCount = lua_gettop(state);
  1377. // Attempt to match the parameters to a valid binding.
  1378. switch (paramCount)
  1379. {
  1380. case 1:
  1381. {
  1382. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1383. {
  1384. Node* instance = getInstance(state);
  1385. void* returnPtr = (void*)instance->getCamera();
  1386. if (returnPtr)
  1387. {
  1388. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1389. object->instance = returnPtr;
  1390. object->owns = false;
  1391. luaL_getmetatable(state, "Camera");
  1392. lua_setmetatable(state, -2);
  1393. }
  1394. else
  1395. {
  1396. lua_pushnil(state);
  1397. }
  1398. return 1;
  1399. }
  1400. else
  1401. {
  1402. lua_pushstring(state, "lua_Node_getCamera - Failed to match the given parameters to a valid function signature.");
  1403. lua_error(state);
  1404. }
  1405. break;
  1406. }
  1407. default:
  1408. {
  1409. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1410. lua_error(state);
  1411. break;
  1412. }
  1413. }
  1414. return 0;
  1415. }
  1416. int lua_Node_getChildCount(lua_State* state)
  1417. {
  1418. // Get the number of parameters.
  1419. int paramCount = lua_gettop(state);
  1420. // Attempt to match the parameters to a valid binding.
  1421. switch (paramCount)
  1422. {
  1423. case 1:
  1424. {
  1425. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1426. {
  1427. Node* instance = getInstance(state);
  1428. unsigned int result = instance->getChildCount();
  1429. // Push the return value onto the stack.
  1430. lua_pushunsigned(state, result);
  1431. return 1;
  1432. }
  1433. else
  1434. {
  1435. lua_pushstring(state, "lua_Node_getChildCount - Failed to match the given parameters to a valid function signature.");
  1436. lua_error(state);
  1437. }
  1438. break;
  1439. }
  1440. default:
  1441. {
  1442. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1443. lua_error(state);
  1444. break;
  1445. }
  1446. }
  1447. return 0;
  1448. }
  1449. int lua_Node_getCollisionObject(lua_State* state)
  1450. {
  1451. // Get the number of parameters.
  1452. int paramCount = lua_gettop(state);
  1453. // Attempt to match the parameters to a valid binding.
  1454. switch (paramCount)
  1455. {
  1456. case 1:
  1457. {
  1458. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1459. {
  1460. Node* instance = getInstance(state);
  1461. void* returnPtr = (void*)instance->getCollisionObject();
  1462. if (returnPtr)
  1463. {
  1464. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1465. object->instance = returnPtr;
  1466. object->owns = false;
  1467. luaL_getmetatable(state, "PhysicsCollisionObject");
  1468. lua_setmetatable(state, -2);
  1469. }
  1470. else
  1471. {
  1472. lua_pushnil(state);
  1473. }
  1474. return 1;
  1475. }
  1476. else
  1477. {
  1478. lua_pushstring(state, "lua_Node_getCollisionObject - Failed to match the given parameters to a valid function signature.");
  1479. lua_error(state);
  1480. }
  1481. break;
  1482. }
  1483. default:
  1484. {
  1485. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1486. lua_error(state);
  1487. break;
  1488. }
  1489. }
  1490. return 0;
  1491. }
  1492. int lua_Node_getDownVector(lua_State* state)
  1493. {
  1494. // Get the number of parameters.
  1495. int paramCount = lua_gettop(state);
  1496. // Attempt to match the parameters to a valid binding.
  1497. switch (paramCount)
  1498. {
  1499. case 1:
  1500. {
  1501. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1502. {
  1503. Node* instance = getInstance(state);
  1504. void* returnPtr = (void*)new Vector3(instance->getDownVector());
  1505. if (returnPtr)
  1506. {
  1507. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1508. object->instance = returnPtr;
  1509. object->owns = true;
  1510. luaL_getmetatable(state, "Vector3");
  1511. lua_setmetatable(state, -2);
  1512. }
  1513. else
  1514. {
  1515. lua_pushnil(state);
  1516. }
  1517. return 1;
  1518. }
  1519. else
  1520. {
  1521. lua_pushstring(state, "lua_Node_getDownVector - Failed to match the given parameters to a valid function signature.");
  1522. lua_error(state);
  1523. }
  1524. break;
  1525. }
  1526. case 2:
  1527. {
  1528. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1529. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1530. {
  1531. // Get parameter 1 off the stack.
  1532. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1533. Node* instance = getInstance(state);
  1534. instance->getDownVector(param1);
  1535. return 0;
  1536. }
  1537. else
  1538. {
  1539. lua_pushstring(state, "lua_Node_getDownVector - Failed to match the given parameters to a valid function signature.");
  1540. lua_error(state);
  1541. }
  1542. break;
  1543. }
  1544. default:
  1545. {
  1546. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1547. lua_error(state);
  1548. break;
  1549. }
  1550. }
  1551. return 0;
  1552. }
  1553. int lua_Node_getFirstChild(lua_State* state)
  1554. {
  1555. // Get the number of parameters.
  1556. int paramCount = lua_gettop(state);
  1557. // Attempt to match the parameters to a valid binding.
  1558. switch (paramCount)
  1559. {
  1560. case 1:
  1561. {
  1562. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1563. {
  1564. Node* instance = getInstance(state);
  1565. void* returnPtr = (void*)instance->getFirstChild();
  1566. if (returnPtr)
  1567. {
  1568. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1569. object->instance = returnPtr;
  1570. object->owns = false;
  1571. luaL_getmetatable(state, "Node");
  1572. lua_setmetatable(state, -2);
  1573. }
  1574. else
  1575. {
  1576. lua_pushnil(state);
  1577. }
  1578. return 1;
  1579. }
  1580. else
  1581. {
  1582. lua_pushstring(state, "lua_Node_getFirstChild - Failed to match the given parameters to a valid function signature.");
  1583. lua_error(state);
  1584. }
  1585. break;
  1586. }
  1587. default:
  1588. {
  1589. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1590. lua_error(state);
  1591. break;
  1592. }
  1593. }
  1594. return 0;
  1595. }
  1596. int lua_Node_getForm(lua_State* state)
  1597. {
  1598. // Get the number of parameters.
  1599. int paramCount = lua_gettop(state);
  1600. // Attempt to match the parameters to a valid binding.
  1601. switch (paramCount)
  1602. {
  1603. case 1:
  1604. {
  1605. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1606. {
  1607. Node* instance = getInstance(state);
  1608. void* returnPtr = (void*)instance->getForm();
  1609. if (returnPtr)
  1610. {
  1611. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1612. object->instance = returnPtr;
  1613. object->owns = false;
  1614. luaL_getmetatable(state, "Form");
  1615. lua_setmetatable(state, -2);
  1616. }
  1617. else
  1618. {
  1619. lua_pushnil(state);
  1620. }
  1621. return 1;
  1622. }
  1623. else
  1624. {
  1625. lua_pushstring(state, "lua_Node_getForm - Failed to match the given parameters to a valid function signature.");
  1626. lua_error(state);
  1627. }
  1628. break;
  1629. }
  1630. default:
  1631. {
  1632. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1633. lua_error(state);
  1634. break;
  1635. }
  1636. }
  1637. return 0;
  1638. }
  1639. int lua_Node_getForwardVector(lua_State* state)
  1640. {
  1641. // Get the number of parameters.
  1642. int paramCount = lua_gettop(state);
  1643. // Attempt to match the parameters to a valid binding.
  1644. switch (paramCount)
  1645. {
  1646. case 1:
  1647. {
  1648. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1649. {
  1650. Node* instance = getInstance(state);
  1651. void* returnPtr = (void*)new Vector3(instance->getForwardVector());
  1652. if (returnPtr)
  1653. {
  1654. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1655. object->instance = returnPtr;
  1656. object->owns = true;
  1657. luaL_getmetatable(state, "Vector3");
  1658. lua_setmetatable(state, -2);
  1659. }
  1660. else
  1661. {
  1662. lua_pushnil(state);
  1663. }
  1664. return 1;
  1665. }
  1666. else
  1667. {
  1668. lua_pushstring(state, "lua_Node_getForwardVector - Failed to match the given parameters to a valid function signature.");
  1669. lua_error(state);
  1670. }
  1671. break;
  1672. }
  1673. case 2:
  1674. {
  1675. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1676. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1677. {
  1678. // Get parameter 1 off the stack.
  1679. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  1680. Node* instance = getInstance(state);
  1681. instance->getForwardVector(param1);
  1682. return 0;
  1683. }
  1684. else
  1685. {
  1686. lua_pushstring(state, "lua_Node_getForwardVector - Failed to match the given parameters to a valid function signature.");
  1687. lua_error(state);
  1688. }
  1689. break;
  1690. }
  1691. default:
  1692. {
  1693. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  1694. lua_error(state);
  1695. break;
  1696. }
  1697. }
  1698. return 0;
  1699. }
  1700. int lua_Node_getForwardVectorView(lua_State* state)
  1701. {
  1702. // Get the number of parameters.
  1703. int paramCount = lua_gettop(state);
  1704. // Attempt to match the parameters to a valid binding.
  1705. switch (paramCount)
  1706. {
  1707. case 1:
  1708. {
  1709. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1710. {
  1711. Node* instance = getInstance(state);
  1712. void* returnPtr = (void*)new Vector3(instance->getForwardVectorView());
  1713. if (returnPtr)
  1714. {
  1715. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1716. object->instance = returnPtr;
  1717. object->owns = true;
  1718. luaL_getmetatable(state, "Vector3");
  1719. lua_setmetatable(state, -2);
  1720. }
  1721. else
  1722. {
  1723. lua_pushnil(state);
  1724. }
  1725. return 1;
  1726. }
  1727. else
  1728. {
  1729. lua_pushstring(state, "lua_Node_getForwardVectorView - Failed to match the given parameters to a valid function signature.");
  1730. lua_error(state);
  1731. }
  1732. break;
  1733. }
  1734. default:
  1735. {
  1736. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1737. lua_error(state);
  1738. break;
  1739. }
  1740. }
  1741. return 0;
  1742. }
  1743. int lua_Node_getForwardVectorWorld(lua_State* state)
  1744. {
  1745. // Get the number of parameters.
  1746. int paramCount = lua_gettop(state);
  1747. // Attempt to match the parameters to a valid binding.
  1748. switch (paramCount)
  1749. {
  1750. case 1:
  1751. {
  1752. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1753. {
  1754. Node* instance = getInstance(state);
  1755. void* returnPtr = (void*)new Vector3(instance->getForwardVectorWorld());
  1756. if (returnPtr)
  1757. {
  1758. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1759. object->instance = returnPtr;
  1760. object->owns = true;
  1761. luaL_getmetatable(state, "Vector3");
  1762. lua_setmetatable(state, -2);
  1763. }
  1764. else
  1765. {
  1766. lua_pushnil(state);
  1767. }
  1768. return 1;
  1769. }
  1770. else
  1771. {
  1772. lua_pushstring(state, "lua_Node_getForwardVectorWorld - Failed to match the given parameters to a valid function signature.");
  1773. lua_error(state);
  1774. }
  1775. break;
  1776. }
  1777. default:
  1778. {
  1779. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1780. lua_error(state);
  1781. break;
  1782. }
  1783. }
  1784. return 0;
  1785. }
  1786. int lua_Node_getId(lua_State* state)
  1787. {
  1788. // Get the number of parameters.
  1789. int paramCount = lua_gettop(state);
  1790. // Attempt to match the parameters to a valid binding.
  1791. switch (paramCount)
  1792. {
  1793. case 1:
  1794. {
  1795. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1796. {
  1797. Node* instance = getInstance(state);
  1798. const char* result = instance->getId();
  1799. // Push the return value onto the stack.
  1800. lua_pushstring(state, result);
  1801. return 1;
  1802. }
  1803. else
  1804. {
  1805. lua_pushstring(state, "lua_Node_getId - Failed to match the given parameters to a valid function signature.");
  1806. lua_error(state);
  1807. }
  1808. break;
  1809. }
  1810. default:
  1811. {
  1812. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1813. lua_error(state);
  1814. break;
  1815. }
  1816. }
  1817. return 0;
  1818. }
  1819. int lua_Node_getInverseTransposeWorldMatrix(lua_State* state)
  1820. {
  1821. // Get the number of parameters.
  1822. int paramCount = lua_gettop(state);
  1823. // Attempt to match the parameters to a valid binding.
  1824. switch (paramCount)
  1825. {
  1826. case 1:
  1827. {
  1828. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1829. {
  1830. Node* instance = getInstance(state);
  1831. void* returnPtr = (void*)&(instance->getInverseTransposeWorldMatrix());
  1832. if (returnPtr)
  1833. {
  1834. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1835. object->instance = returnPtr;
  1836. object->owns = false;
  1837. luaL_getmetatable(state, "Matrix");
  1838. lua_setmetatable(state, -2);
  1839. }
  1840. else
  1841. {
  1842. lua_pushnil(state);
  1843. }
  1844. return 1;
  1845. }
  1846. else
  1847. {
  1848. lua_pushstring(state, "lua_Node_getInverseTransposeWorldMatrix - Failed to match the given parameters to a valid function signature.");
  1849. lua_error(state);
  1850. }
  1851. break;
  1852. }
  1853. default:
  1854. {
  1855. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1856. lua_error(state);
  1857. break;
  1858. }
  1859. }
  1860. return 0;
  1861. }
  1862. int lua_Node_getInverseTransposeWorldViewMatrix(lua_State* state)
  1863. {
  1864. // Get the number of parameters.
  1865. int paramCount = lua_gettop(state);
  1866. // Attempt to match the parameters to a valid binding.
  1867. switch (paramCount)
  1868. {
  1869. case 1:
  1870. {
  1871. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1872. {
  1873. Node* instance = getInstance(state);
  1874. void* returnPtr = (void*)&(instance->getInverseTransposeWorldViewMatrix());
  1875. if (returnPtr)
  1876. {
  1877. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1878. object->instance = returnPtr;
  1879. object->owns = false;
  1880. luaL_getmetatable(state, "Matrix");
  1881. lua_setmetatable(state, -2);
  1882. }
  1883. else
  1884. {
  1885. lua_pushnil(state);
  1886. }
  1887. return 1;
  1888. }
  1889. else
  1890. {
  1891. lua_pushstring(state, "lua_Node_getInverseTransposeWorldViewMatrix - Failed to match the given parameters to a valid function signature.");
  1892. lua_error(state);
  1893. }
  1894. break;
  1895. }
  1896. default:
  1897. {
  1898. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1899. lua_error(state);
  1900. break;
  1901. }
  1902. }
  1903. return 0;
  1904. }
  1905. int lua_Node_getInverseViewMatrix(lua_State* state)
  1906. {
  1907. // Get the number of parameters.
  1908. int paramCount = lua_gettop(state);
  1909. // Attempt to match the parameters to a valid binding.
  1910. switch (paramCount)
  1911. {
  1912. case 1:
  1913. {
  1914. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1915. {
  1916. Node* instance = getInstance(state);
  1917. void* returnPtr = (void*)&(instance->getInverseViewMatrix());
  1918. if (returnPtr)
  1919. {
  1920. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1921. object->instance = returnPtr;
  1922. object->owns = false;
  1923. luaL_getmetatable(state, "Matrix");
  1924. lua_setmetatable(state, -2);
  1925. }
  1926. else
  1927. {
  1928. lua_pushnil(state);
  1929. }
  1930. return 1;
  1931. }
  1932. else
  1933. {
  1934. lua_pushstring(state, "lua_Node_getInverseViewMatrix - Failed to match the given parameters to a valid function signature.");
  1935. lua_error(state);
  1936. }
  1937. break;
  1938. }
  1939. default:
  1940. {
  1941. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1942. lua_error(state);
  1943. break;
  1944. }
  1945. }
  1946. return 0;
  1947. }
  1948. int lua_Node_getInverseViewProjectionMatrix(lua_State* state)
  1949. {
  1950. // Get the number of parameters.
  1951. int paramCount = lua_gettop(state);
  1952. // Attempt to match the parameters to a valid binding.
  1953. switch (paramCount)
  1954. {
  1955. case 1:
  1956. {
  1957. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1958. {
  1959. Node* instance = getInstance(state);
  1960. void* returnPtr = (void*)&(instance->getInverseViewProjectionMatrix());
  1961. if (returnPtr)
  1962. {
  1963. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  1964. object->instance = returnPtr;
  1965. object->owns = false;
  1966. luaL_getmetatable(state, "Matrix");
  1967. lua_setmetatable(state, -2);
  1968. }
  1969. else
  1970. {
  1971. lua_pushnil(state);
  1972. }
  1973. return 1;
  1974. }
  1975. else
  1976. {
  1977. lua_pushstring(state, "lua_Node_getInverseViewProjectionMatrix - Failed to match the given parameters to a valid function signature.");
  1978. lua_error(state);
  1979. }
  1980. break;
  1981. }
  1982. default:
  1983. {
  1984. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1985. lua_error(state);
  1986. break;
  1987. }
  1988. }
  1989. return 0;
  1990. }
  1991. int lua_Node_getLeftVector(lua_State* state)
  1992. {
  1993. // Get the number of parameters.
  1994. int paramCount = lua_gettop(state);
  1995. // Attempt to match the parameters to a valid binding.
  1996. switch (paramCount)
  1997. {
  1998. case 1:
  1999. {
  2000. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2001. {
  2002. Node* instance = getInstance(state);
  2003. void* returnPtr = (void*)new Vector3(instance->getLeftVector());
  2004. if (returnPtr)
  2005. {
  2006. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2007. object->instance = returnPtr;
  2008. object->owns = true;
  2009. luaL_getmetatable(state, "Vector3");
  2010. lua_setmetatable(state, -2);
  2011. }
  2012. else
  2013. {
  2014. lua_pushnil(state);
  2015. }
  2016. return 1;
  2017. }
  2018. else
  2019. {
  2020. lua_pushstring(state, "lua_Node_getLeftVector - Failed to match the given parameters to a valid function signature.");
  2021. lua_error(state);
  2022. }
  2023. break;
  2024. }
  2025. case 2:
  2026. {
  2027. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2028. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2029. {
  2030. // Get parameter 1 off the stack.
  2031. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  2032. Node* instance = getInstance(state);
  2033. instance->getLeftVector(param1);
  2034. return 0;
  2035. }
  2036. else
  2037. {
  2038. lua_pushstring(state, "lua_Node_getLeftVector - 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 1 or 2).");
  2046. lua_error(state);
  2047. break;
  2048. }
  2049. }
  2050. return 0;
  2051. }
  2052. int lua_Node_getLight(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 1:
  2060. {
  2061. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2062. {
  2063. Node* instance = getInstance(state);
  2064. void* returnPtr = (void*)instance->getLight();
  2065. if (returnPtr)
  2066. {
  2067. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2068. object->instance = returnPtr;
  2069. object->owns = false;
  2070. luaL_getmetatable(state, "Light");
  2071. lua_setmetatable(state, -2);
  2072. }
  2073. else
  2074. {
  2075. lua_pushnil(state);
  2076. }
  2077. return 1;
  2078. }
  2079. else
  2080. {
  2081. lua_pushstring(state, "lua_Node_getLight - Failed to match the given parameters to a valid function signature.");
  2082. lua_error(state);
  2083. }
  2084. break;
  2085. }
  2086. default:
  2087. {
  2088. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2089. lua_error(state);
  2090. break;
  2091. }
  2092. }
  2093. return 0;
  2094. }
  2095. int lua_Node_getMatrix(lua_State* state)
  2096. {
  2097. // Get the number of parameters.
  2098. int paramCount = lua_gettop(state);
  2099. // Attempt to match the parameters to a valid binding.
  2100. switch (paramCount)
  2101. {
  2102. case 1:
  2103. {
  2104. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2105. {
  2106. Node* instance = getInstance(state);
  2107. void* returnPtr = (void*)&(instance->getMatrix());
  2108. if (returnPtr)
  2109. {
  2110. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2111. object->instance = returnPtr;
  2112. object->owns = false;
  2113. luaL_getmetatable(state, "Matrix");
  2114. lua_setmetatable(state, -2);
  2115. }
  2116. else
  2117. {
  2118. lua_pushnil(state);
  2119. }
  2120. return 1;
  2121. }
  2122. else
  2123. {
  2124. lua_pushstring(state, "lua_Node_getMatrix - Failed to match the given parameters to a valid function signature.");
  2125. lua_error(state);
  2126. }
  2127. break;
  2128. }
  2129. default:
  2130. {
  2131. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2132. lua_error(state);
  2133. break;
  2134. }
  2135. }
  2136. return 0;
  2137. }
  2138. int lua_Node_getModel(lua_State* state)
  2139. {
  2140. // Get the number of parameters.
  2141. int paramCount = lua_gettop(state);
  2142. // Attempt to match the parameters to a valid binding.
  2143. switch (paramCount)
  2144. {
  2145. case 1:
  2146. {
  2147. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2148. {
  2149. Node* instance = getInstance(state);
  2150. void* returnPtr = (void*)instance->getModel();
  2151. if (returnPtr)
  2152. {
  2153. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2154. object->instance = returnPtr;
  2155. object->owns = false;
  2156. luaL_getmetatable(state, "Model");
  2157. lua_setmetatable(state, -2);
  2158. }
  2159. else
  2160. {
  2161. lua_pushnil(state);
  2162. }
  2163. return 1;
  2164. }
  2165. else
  2166. {
  2167. lua_pushstring(state, "lua_Node_getModel - Failed to match the given parameters to a valid function signature.");
  2168. lua_error(state);
  2169. }
  2170. break;
  2171. }
  2172. default:
  2173. {
  2174. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2175. lua_error(state);
  2176. break;
  2177. }
  2178. }
  2179. return 0;
  2180. }
  2181. int lua_Node_getNextSibling(lua_State* state)
  2182. {
  2183. // Get the number of parameters.
  2184. int paramCount = lua_gettop(state);
  2185. // Attempt to match the parameters to a valid binding.
  2186. switch (paramCount)
  2187. {
  2188. case 1:
  2189. {
  2190. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2191. {
  2192. Node* instance = getInstance(state);
  2193. void* returnPtr = (void*)instance->getNextSibling();
  2194. if (returnPtr)
  2195. {
  2196. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2197. object->instance = returnPtr;
  2198. object->owns = false;
  2199. luaL_getmetatable(state, "Node");
  2200. lua_setmetatable(state, -2);
  2201. }
  2202. else
  2203. {
  2204. lua_pushnil(state);
  2205. }
  2206. return 1;
  2207. }
  2208. else
  2209. {
  2210. lua_pushstring(state, "lua_Node_getNextSibling - Failed to match the given parameters to a valid function signature.");
  2211. lua_error(state);
  2212. }
  2213. break;
  2214. }
  2215. default:
  2216. {
  2217. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2218. lua_error(state);
  2219. break;
  2220. }
  2221. }
  2222. return 0;
  2223. }
  2224. int lua_Node_getNumAdvertisedDescendants(lua_State* state)
  2225. {
  2226. // Get the number of parameters.
  2227. int paramCount = lua_gettop(state);
  2228. // Attempt to match the parameters to a valid binding.
  2229. switch (paramCount)
  2230. {
  2231. case 1:
  2232. {
  2233. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2234. {
  2235. Node* instance = getInstance(state);
  2236. unsigned int result = instance->getNumAdvertisedDescendants();
  2237. // Push the return value onto the stack.
  2238. lua_pushunsigned(state, result);
  2239. return 1;
  2240. }
  2241. else
  2242. {
  2243. lua_pushstring(state, "lua_Node_getNumAdvertisedDescendants - Failed to match the given parameters to a valid function signature.");
  2244. lua_error(state);
  2245. }
  2246. break;
  2247. }
  2248. default:
  2249. {
  2250. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2251. lua_error(state);
  2252. break;
  2253. }
  2254. }
  2255. return 0;
  2256. }
  2257. int lua_Node_getParent(lua_State* state)
  2258. {
  2259. // Get the number of parameters.
  2260. int paramCount = lua_gettop(state);
  2261. // Attempt to match the parameters to a valid binding.
  2262. switch (paramCount)
  2263. {
  2264. case 1:
  2265. {
  2266. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2267. {
  2268. Node* instance = getInstance(state);
  2269. void* returnPtr = (void*)instance->getParent();
  2270. if (returnPtr)
  2271. {
  2272. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2273. object->instance = returnPtr;
  2274. object->owns = false;
  2275. luaL_getmetatable(state, "Node");
  2276. lua_setmetatable(state, -2);
  2277. }
  2278. else
  2279. {
  2280. lua_pushnil(state);
  2281. }
  2282. return 1;
  2283. }
  2284. else
  2285. {
  2286. lua_pushstring(state, "lua_Node_getParent - Failed to match the given parameters to a valid function signature.");
  2287. lua_error(state);
  2288. }
  2289. break;
  2290. }
  2291. default:
  2292. {
  2293. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2294. lua_error(state);
  2295. break;
  2296. }
  2297. }
  2298. return 0;
  2299. }
  2300. int lua_Node_getParticleEmitter(lua_State* state)
  2301. {
  2302. // Get the number of parameters.
  2303. int paramCount = lua_gettop(state);
  2304. // Attempt to match the parameters to a valid binding.
  2305. switch (paramCount)
  2306. {
  2307. case 1:
  2308. {
  2309. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2310. {
  2311. Node* instance = getInstance(state);
  2312. void* returnPtr = (void*)instance->getParticleEmitter();
  2313. if (returnPtr)
  2314. {
  2315. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2316. object->instance = returnPtr;
  2317. object->owns = false;
  2318. luaL_getmetatable(state, "ParticleEmitter");
  2319. lua_setmetatable(state, -2);
  2320. }
  2321. else
  2322. {
  2323. lua_pushnil(state);
  2324. }
  2325. return 1;
  2326. }
  2327. else
  2328. {
  2329. lua_pushstring(state, "lua_Node_getParticleEmitter - Failed to match the given parameters to a valid function signature.");
  2330. lua_error(state);
  2331. }
  2332. break;
  2333. }
  2334. default:
  2335. {
  2336. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2337. lua_error(state);
  2338. break;
  2339. }
  2340. }
  2341. return 0;
  2342. }
  2343. int lua_Node_getPreviousSibling(lua_State* state)
  2344. {
  2345. // Get the number of parameters.
  2346. int paramCount = lua_gettop(state);
  2347. // Attempt to match the parameters to a valid binding.
  2348. switch (paramCount)
  2349. {
  2350. case 1:
  2351. {
  2352. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2353. {
  2354. Node* instance = getInstance(state);
  2355. void* returnPtr = (void*)instance->getPreviousSibling();
  2356. if (returnPtr)
  2357. {
  2358. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2359. object->instance = returnPtr;
  2360. object->owns = false;
  2361. luaL_getmetatable(state, "Node");
  2362. lua_setmetatable(state, -2);
  2363. }
  2364. else
  2365. {
  2366. lua_pushnil(state);
  2367. }
  2368. return 1;
  2369. }
  2370. else
  2371. {
  2372. lua_pushstring(state, "lua_Node_getPreviousSibling - Failed to match the given parameters to a valid function signature.");
  2373. lua_error(state);
  2374. }
  2375. break;
  2376. }
  2377. default:
  2378. {
  2379. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2380. lua_error(state);
  2381. break;
  2382. }
  2383. }
  2384. return 0;
  2385. }
  2386. int lua_Node_getProjectionMatrix(lua_State* state)
  2387. {
  2388. // Get the number of parameters.
  2389. int paramCount = lua_gettop(state);
  2390. // Attempt to match the parameters to a valid binding.
  2391. switch (paramCount)
  2392. {
  2393. case 1:
  2394. {
  2395. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2396. {
  2397. Node* instance = getInstance(state);
  2398. void* returnPtr = (void*)&(instance->getProjectionMatrix());
  2399. if (returnPtr)
  2400. {
  2401. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2402. object->instance = returnPtr;
  2403. object->owns = false;
  2404. luaL_getmetatable(state, "Matrix");
  2405. lua_setmetatable(state, -2);
  2406. }
  2407. else
  2408. {
  2409. lua_pushnil(state);
  2410. }
  2411. return 1;
  2412. }
  2413. else
  2414. {
  2415. lua_pushstring(state, "lua_Node_getProjectionMatrix - Failed to match the given parameters to a valid function signature.");
  2416. lua_error(state);
  2417. }
  2418. break;
  2419. }
  2420. default:
  2421. {
  2422. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2423. lua_error(state);
  2424. break;
  2425. }
  2426. }
  2427. return 0;
  2428. }
  2429. int lua_Node_getRefCount(lua_State* state)
  2430. {
  2431. // Get the number of parameters.
  2432. int paramCount = lua_gettop(state);
  2433. // Attempt to match the parameters to a valid binding.
  2434. switch (paramCount)
  2435. {
  2436. case 1:
  2437. {
  2438. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2439. {
  2440. Node* instance = getInstance(state);
  2441. unsigned int result = instance->getRefCount();
  2442. // Push the return value onto the stack.
  2443. lua_pushunsigned(state, result);
  2444. return 1;
  2445. }
  2446. else
  2447. {
  2448. lua_pushstring(state, "lua_Node_getRefCount - Failed to match the given parameters to a valid function signature.");
  2449. lua_error(state);
  2450. }
  2451. break;
  2452. }
  2453. default:
  2454. {
  2455. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2456. lua_error(state);
  2457. break;
  2458. }
  2459. }
  2460. return 0;
  2461. }
  2462. int lua_Node_getRightVector(lua_State* state)
  2463. {
  2464. // Get the number of parameters.
  2465. int paramCount = lua_gettop(state);
  2466. // Attempt to match the parameters to a valid binding.
  2467. switch (paramCount)
  2468. {
  2469. case 1:
  2470. {
  2471. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2472. {
  2473. Node* instance = getInstance(state);
  2474. void* returnPtr = (void*)new Vector3(instance->getRightVector());
  2475. if (returnPtr)
  2476. {
  2477. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2478. object->instance = returnPtr;
  2479. object->owns = true;
  2480. luaL_getmetatable(state, "Vector3");
  2481. lua_setmetatable(state, -2);
  2482. }
  2483. else
  2484. {
  2485. lua_pushnil(state);
  2486. }
  2487. return 1;
  2488. }
  2489. else
  2490. {
  2491. lua_pushstring(state, "lua_Node_getRightVector - Failed to match the given parameters to a valid function signature.");
  2492. lua_error(state);
  2493. }
  2494. break;
  2495. }
  2496. case 2:
  2497. {
  2498. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2499. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2500. {
  2501. // Get parameter 1 off the stack.
  2502. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  2503. Node* instance = getInstance(state);
  2504. instance->getRightVector(param1);
  2505. return 0;
  2506. }
  2507. else
  2508. {
  2509. lua_pushstring(state, "lua_Node_getRightVector - Failed to match the given parameters to a valid function signature.");
  2510. lua_error(state);
  2511. }
  2512. break;
  2513. }
  2514. default:
  2515. {
  2516. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2517. lua_error(state);
  2518. break;
  2519. }
  2520. }
  2521. return 0;
  2522. }
  2523. int lua_Node_getRightVectorWorld(lua_State* state)
  2524. {
  2525. // Get the number of parameters.
  2526. int paramCount = lua_gettop(state);
  2527. // Attempt to match the parameters to a valid binding.
  2528. switch (paramCount)
  2529. {
  2530. case 1:
  2531. {
  2532. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2533. {
  2534. Node* instance = getInstance(state);
  2535. void* returnPtr = (void*)new Vector3(instance->getRightVectorWorld());
  2536. if (returnPtr)
  2537. {
  2538. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2539. object->instance = returnPtr;
  2540. object->owns = true;
  2541. luaL_getmetatable(state, "Vector3");
  2542. lua_setmetatable(state, -2);
  2543. }
  2544. else
  2545. {
  2546. lua_pushnil(state);
  2547. }
  2548. return 1;
  2549. }
  2550. else
  2551. {
  2552. lua_pushstring(state, "lua_Node_getRightVectorWorld - Failed to match the given parameters to a valid function signature.");
  2553. lua_error(state);
  2554. }
  2555. break;
  2556. }
  2557. default:
  2558. {
  2559. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2560. lua_error(state);
  2561. break;
  2562. }
  2563. }
  2564. return 0;
  2565. }
  2566. int lua_Node_getRootNode(lua_State* state)
  2567. {
  2568. // Get the number of parameters.
  2569. int paramCount = lua_gettop(state);
  2570. // Attempt to match the parameters to a valid binding.
  2571. switch (paramCount)
  2572. {
  2573. case 1:
  2574. {
  2575. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2576. {
  2577. Node* instance = getInstance(state);
  2578. void* returnPtr = (void*)instance->getRootNode();
  2579. if (returnPtr)
  2580. {
  2581. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2582. object->instance = returnPtr;
  2583. object->owns = false;
  2584. luaL_getmetatable(state, "Node");
  2585. lua_setmetatable(state, -2);
  2586. }
  2587. else
  2588. {
  2589. lua_pushnil(state);
  2590. }
  2591. return 1;
  2592. }
  2593. else
  2594. {
  2595. lua_pushstring(state, "lua_Node_getRootNode - Failed to match the given parameters to a valid function signature.");
  2596. lua_error(state);
  2597. }
  2598. break;
  2599. }
  2600. default:
  2601. {
  2602. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2603. lua_error(state);
  2604. break;
  2605. }
  2606. }
  2607. return 0;
  2608. }
  2609. int lua_Node_getRotation(lua_State* state)
  2610. {
  2611. // Get the number of parameters.
  2612. int paramCount = lua_gettop(state);
  2613. // Attempt to match the parameters to a valid binding.
  2614. switch (paramCount)
  2615. {
  2616. case 1:
  2617. {
  2618. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2619. {
  2620. Node* instance = getInstance(state);
  2621. void* returnPtr = (void*)&(instance->getRotation());
  2622. if (returnPtr)
  2623. {
  2624. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2625. object->instance = returnPtr;
  2626. object->owns = false;
  2627. luaL_getmetatable(state, "Quaternion");
  2628. lua_setmetatable(state, -2);
  2629. }
  2630. else
  2631. {
  2632. lua_pushnil(state);
  2633. }
  2634. return 1;
  2635. }
  2636. else
  2637. {
  2638. lua_pushstring(state, "lua_Node_getRotation - Failed to match the given parameters to a valid function signature.");
  2639. lua_error(state);
  2640. }
  2641. break;
  2642. }
  2643. case 2:
  2644. {
  2645. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2646. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2647. {
  2648. // Get parameter 1 off the stack.
  2649. ScriptUtil::LuaArray<Quaternion> param1 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", false);
  2650. Node* instance = getInstance(state);
  2651. instance->getRotation(param1);
  2652. return 0;
  2653. }
  2654. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2655. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2656. {
  2657. // Get parameter 1 off the stack.
  2658. ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", false);
  2659. Node* instance = getInstance(state);
  2660. instance->getRotation(param1);
  2661. return 0;
  2662. }
  2663. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2664. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2665. {
  2666. // Get parameter 1 off the stack.
  2667. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  2668. Node* instance = getInstance(state);
  2669. float result = instance->getRotation(param1);
  2670. // Push the return value onto the stack.
  2671. lua_pushnumber(state, result);
  2672. return 1;
  2673. }
  2674. else
  2675. {
  2676. lua_pushstring(state, "lua_Node_getRotation - Failed to match the given parameters to a valid function signature.");
  2677. lua_error(state);
  2678. }
  2679. break;
  2680. }
  2681. default:
  2682. {
  2683. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2684. lua_error(state);
  2685. break;
  2686. }
  2687. }
  2688. return 0;
  2689. }
  2690. int lua_Node_getScale(lua_State* state)
  2691. {
  2692. // Get the number of parameters.
  2693. int paramCount = lua_gettop(state);
  2694. // Attempt to match the parameters to a valid binding.
  2695. switch (paramCount)
  2696. {
  2697. case 1:
  2698. {
  2699. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2700. {
  2701. Node* instance = getInstance(state);
  2702. void* returnPtr = (void*)&(instance->getScale());
  2703. if (returnPtr)
  2704. {
  2705. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2706. object->instance = returnPtr;
  2707. object->owns = false;
  2708. luaL_getmetatable(state, "Vector3");
  2709. lua_setmetatable(state, -2);
  2710. }
  2711. else
  2712. {
  2713. lua_pushnil(state);
  2714. }
  2715. return 1;
  2716. }
  2717. else
  2718. {
  2719. lua_pushstring(state, "lua_Node_getScale - Failed to match the given parameters to a valid function signature.");
  2720. lua_error(state);
  2721. }
  2722. break;
  2723. }
  2724. case 2:
  2725. {
  2726. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2727. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2728. {
  2729. // Get parameter 1 off the stack.
  2730. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  2731. Node* instance = getInstance(state);
  2732. instance->getScale(param1);
  2733. return 0;
  2734. }
  2735. else
  2736. {
  2737. lua_pushstring(state, "lua_Node_getScale - Failed to match the given parameters to a valid function signature.");
  2738. lua_error(state);
  2739. }
  2740. break;
  2741. }
  2742. default:
  2743. {
  2744. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2745. lua_error(state);
  2746. break;
  2747. }
  2748. }
  2749. return 0;
  2750. }
  2751. int lua_Node_getScaleX(lua_State* state)
  2752. {
  2753. // Get the number of parameters.
  2754. int paramCount = lua_gettop(state);
  2755. // Attempt to match the parameters to a valid binding.
  2756. switch (paramCount)
  2757. {
  2758. case 1:
  2759. {
  2760. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2761. {
  2762. Node* instance = getInstance(state);
  2763. float result = instance->getScaleX();
  2764. // Push the return value onto the stack.
  2765. lua_pushnumber(state, result);
  2766. return 1;
  2767. }
  2768. else
  2769. {
  2770. lua_pushstring(state, "lua_Node_getScaleX - Failed to match the given parameters to a valid function signature.");
  2771. lua_error(state);
  2772. }
  2773. break;
  2774. }
  2775. default:
  2776. {
  2777. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2778. lua_error(state);
  2779. break;
  2780. }
  2781. }
  2782. return 0;
  2783. }
  2784. int lua_Node_getScaleY(lua_State* state)
  2785. {
  2786. // Get the number of parameters.
  2787. int paramCount = lua_gettop(state);
  2788. // Attempt to match the parameters to a valid binding.
  2789. switch (paramCount)
  2790. {
  2791. case 1:
  2792. {
  2793. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2794. {
  2795. Node* instance = getInstance(state);
  2796. float result = instance->getScaleY();
  2797. // Push the return value onto the stack.
  2798. lua_pushnumber(state, result);
  2799. return 1;
  2800. }
  2801. else
  2802. {
  2803. lua_pushstring(state, "lua_Node_getScaleY - Failed to match the given parameters to a valid function signature.");
  2804. lua_error(state);
  2805. }
  2806. break;
  2807. }
  2808. default:
  2809. {
  2810. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2811. lua_error(state);
  2812. break;
  2813. }
  2814. }
  2815. return 0;
  2816. }
  2817. int lua_Node_getScaleZ(lua_State* state)
  2818. {
  2819. // Get the number of parameters.
  2820. int paramCount = lua_gettop(state);
  2821. // Attempt to match the parameters to a valid binding.
  2822. switch (paramCount)
  2823. {
  2824. case 1:
  2825. {
  2826. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2827. {
  2828. Node* instance = getInstance(state);
  2829. float result = instance->getScaleZ();
  2830. // Push the return value onto the stack.
  2831. lua_pushnumber(state, result);
  2832. return 1;
  2833. }
  2834. else
  2835. {
  2836. lua_pushstring(state, "lua_Node_getScaleZ - Failed to match the given parameters to a valid function signature.");
  2837. lua_error(state);
  2838. }
  2839. break;
  2840. }
  2841. default:
  2842. {
  2843. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2844. lua_error(state);
  2845. break;
  2846. }
  2847. }
  2848. return 0;
  2849. }
  2850. int lua_Node_getScene(lua_State* state)
  2851. {
  2852. // Get the number of parameters.
  2853. int paramCount = lua_gettop(state);
  2854. // Attempt to match the parameters to a valid binding.
  2855. switch (paramCount)
  2856. {
  2857. case 1:
  2858. {
  2859. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2860. {
  2861. Node* instance = getInstance(state);
  2862. void* returnPtr = (void*)instance->getScene();
  2863. if (returnPtr)
  2864. {
  2865. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2866. object->instance = returnPtr;
  2867. object->owns = false;
  2868. luaL_getmetatable(state, "Scene");
  2869. lua_setmetatable(state, -2);
  2870. }
  2871. else
  2872. {
  2873. lua_pushnil(state);
  2874. }
  2875. return 1;
  2876. }
  2877. else
  2878. {
  2879. lua_pushstring(state, "lua_Node_getScene - Failed to match the given parameters to a valid function signature.");
  2880. lua_error(state);
  2881. }
  2882. break;
  2883. }
  2884. default:
  2885. {
  2886. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  2887. lua_error(state);
  2888. break;
  2889. }
  2890. }
  2891. return 0;
  2892. }
  2893. int lua_Node_getTag(lua_State* state)
  2894. {
  2895. // Get the number of parameters.
  2896. int paramCount = lua_gettop(state);
  2897. // Attempt to match the parameters to a valid binding.
  2898. switch (paramCount)
  2899. {
  2900. case 2:
  2901. {
  2902. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2903. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  2904. {
  2905. // Get parameter 1 off the stack.
  2906. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  2907. Node* instance = getInstance(state);
  2908. const char* result = instance->getTag(param1);
  2909. // Push the return value onto the stack.
  2910. lua_pushstring(state, result);
  2911. return 1;
  2912. }
  2913. else
  2914. {
  2915. lua_pushstring(state, "lua_Node_getTag - Failed to match the given parameters to a valid function signature.");
  2916. lua_error(state);
  2917. }
  2918. break;
  2919. }
  2920. default:
  2921. {
  2922. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  2923. lua_error(state);
  2924. break;
  2925. }
  2926. }
  2927. return 0;
  2928. }
  2929. int lua_Node_getTranslation(lua_State* state)
  2930. {
  2931. // Get the number of parameters.
  2932. int paramCount = lua_gettop(state);
  2933. // Attempt to match the parameters to a valid binding.
  2934. switch (paramCount)
  2935. {
  2936. case 1:
  2937. {
  2938. if ((lua_type(state, 1) == LUA_TUSERDATA))
  2939. {
  2940. Node* instance = getInstance(state);
  2941. void* returnPtr = (void*)&(instance->getTranslation());
  2942. if (returnPtr)
  2943. {
  2944. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  2945. object->instance = returnPtr;
  2946. object->owns = false;
  2947. luaL_getmetatable(state, "Vector3");
  2948. lua_setmetatable(state, -2);
  2949. }
  2950. else
  2951. {
  2952. lua_pushnil(state);
  2953. }
  2954. return 1;
  2955. }
  2956. else
  2957. {
  2958. lua_pushstring(state, "lua_Node_getTranslation - Failed to match the given parameters to a valid function signature.");
  2959. lua_error(state);
  2960. }
  2961. break;
  2962. }
  2963. case 2:
  2964. {
  2965. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  2966. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  2967. {
  2968. // Get parameter 1 off the stack.
  2969. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  2970. Node* instance = getInstance(state);
  2971. instance->getTranslation(param1);
  2972. return 0;
  2973. }
  2974. else
  2975. {
  2976. lua_pushstring(state, "lua_Node_getTranslation - Failed to match the given parameters to a valid function signature.");
  2977. lua_error(state);
  2978. }
  2979. break;
  2980. }
  2981. default:
  2982. {
  2983. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  2984. lua_error(state);
  2985. break;
  2986. }
  2987. }
  2988. return 0;
  2989. }
  2990. int lua_Node_getTranslationView(lua_State* state)
  2991. {
  2992. // Get the number of parameters.
  2993. int paramCount = lua_gettop(state);
  2994. // Attempt to match the parameters to a valid binding.
  2995. switch (paramCount)
  2996. {
  2997. case 1:
  2998. {
  2999. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3000. {
  3001. Node* instance = getInstance(state);
  3002. void* returnPtr = (void*)new Vector3(instance->getTranslationView());
  3003. if (returnPtr)
  3004. {
  3005. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3006. object->instance = returnPtr;
  3007. object->owns = true;
  3008. luaL_getmetatable(state, "Vector3");
  3009. lua_setmetatable(state, -2);
  3010. }
  3011. else
  3012. {
  3013. lua_pushnil(state);
  3014. }
  3015. return 1;
  3016. }
  3017. else
  3018. {
  3019. lua_pushstring(state, "lua_Node_getTranslationView - Failed to match the given parameters to a valid function signature.");
  3020. lua_error(state);
  3021. }
  3022. break;
  3023. }
  3024. default:
  3025. {
  3026. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3027. lua_error(state);
  3028. break;
  3029. }
  3030. }
  3031. return 0;
  3032. }
  3033. int lua_Node_getTranslationWorld(lua_State* state)
  3034. {
  3035. // Get the number of parameters.
  3036. int paramCount = lua_gettop(state);
  3037. // Attempt to match the parameters to a valid binding.
  3038. switch (paramCount)
  3039. {
  3040. case 1:
  3041. {
  3042. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3043. {
  3044. Node* instance = getInstance(state);
  3045. void* returnPtr = (void*)new Vector3(instance->getTranslationWorld());
  3046. if (returnPtr)
  3047. {
  3048. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3049. object->instance = returnPtr;
  3050. object->owns = true;
  3051. luaL_getmetatable(state, "Vector3");
  3052. lua_setmetatable(state, -2);
  3053. }
  3054. else
  3055. {
  3056. lua_pushnil(state);
  3057. }
  3058. return 1;
  3059. }
  3060. else
  3061. {
  3062. lua_pushstring(state, "lua_Node_getTranslationWorld - Failed to match the given parameters to a valid function signature.");
  3063. lua_error(state);
  3064. }
  3065. break;
  3066. }
  3067. default:
  3068. {
  3069. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3070. lua_error(state);
  3071. break;
  3072. }
  3073. }
  3074. return 0;
  3075. }
  3076. int lua_Node_getTranslationX(lua_State* state)
  3077. {
  3078. // Get the number of parameters.
  3079. int paramCount = lua_gettop(state);
  3080. // Attempt to match the parameters to a valid binding.
  3081. switch (paramCount)
  3082. {
  3083. case 1:
  3084. {
  3085. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3086. {
  3087. Node* instance = getInstance(state);
  3088. float result = instance->getTranslationX();
  3089. // Push the return value onto the stack.
  3090. lua_pushnumber(state, result);
  3091. return 1;
  3092. }
  3093. else
  3094. {
  3095. lua_pushstring(state, "lua_Node_getTranslationX - Failed to match the given parameters to a valid function signature.");
  3096. lua_error(state);
  3097. }
  3098. break;
  3099. }
  3100. default:
  3101. {
  3102. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3103. lua_error(state);
  3104. break;
  3105. }
  3106. }
  3107. return 0;
  3108. }
  3109. int lua_Node_getTranslationY(lua_State* state)
  3110. {
  3111. // Get the number of parameters.
  3112. int paramCount = lua_gettop(state);
  3113. // Attempt to match the parameters to a valid binding.
  3114. switch (paramCount)
  3115. {
  3116. case 1:
  3117. {
  3118. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3119. {
  3120. Node* instance = getInstance(state);
  3121. float result = instance->getTranslationY();
  3122. // Push the return value onto the stack.
  3123. lua_pushnumber(state, result);
  3124. return 1;
  3125. }
  3126. else
  3127. {
  3128. lua_pushstring(state, "lua_Node_getTranslationY - Failed to match the given parameters to a valid function signature.");
  3129. lua_error(state);
  3130. }
  3131. break;
  3132. }
  3133. default:
  3134. {
  3135. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3136. lua_error(state);
  3137. break;
  3138. }
  3139. }
  3140. return 0;
  3141. }
  3142. int lua_Node_getTranslationZ(lua_State* state)
  3143. {
  3144. // Get the number of parameters.
  3145. int paramCount = lua_gettop(state);
  3146. // Attempt to match the parameters to a valid binding.
  3147. switch (paramCount)
  3148. {
  3149. case 1:
  3150. {
  3151. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3152. {
  3153. Node* instance = getInstance(state);
  3154. float result = instance->getTranslationZ();
  3155. // Push the return value onto the stack.
  3156. lua_pushnumber(state, result);
  3157. return 1;
  3158. }
  3159. else
  3160. {
  3161. lua_pushstring(state, "lua_Node_getTranslationZ - Failed to match the given parameters to a valid function signature.");
  3162. lua_error(state);
  3163. }
  3164. break;
  3165. }
  3166. default:
  3167. {
  3168. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3169. lua_error(state);
  3170. break;
  3171. }
  3172. }
  3173. return 0;
  3174. }
  3175. int lua_Node_getType(lua_State* state)
  3176. {
  3177. // Get the number of parameters.
  3178. int paramCount = lua_gettop(state);
  3179. // Attempt to match the parameters to a valid binding.
  3180. switch (paramCount)
  3181. {
  3182. case 1:
  3183. {
  3184. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3185. {
  3186. Node* instance = getInstance(state);
  3187. Node::Type result = instance->getType();
  3188. // Push the return value onto the stack.
  3189. lua_pushstring(state, lua_stringFromEnum_NodeType(result));
  3190. return 1;
  3191. }
  3192. else
  3193. {
  3194. lua_pushstring(state, "lua_Node_getType - Failed to match the given parameters to a valid function signature.");
  3195. lua_error(state);
  3196. }
  3197. break;
  3198. }
  3199. default:
  3200. {
  3201. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3202. lua_error(state);
  3203. break;
  3204. }
  3205. }
  3206. return 0;
  3207. }
  3208. int lua_Node_getUpVector(lua_State* state)
  3209. {
  3210. // Get the number of parameters.
  3211. int paramCount = lua_gettop(state);
  3212. // Attempt to match the parameters to a valid binding.
  3213. switch (paramCount)
  3214. {
  3215. case 1:
  3216. {
  3217. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3218. {
  3219. Node* instance = getInstance(state);
  3220. void* returnPtr = (void*)new Vector3(instance->getUpVector());
  3221. if (returnPtr)
  3222. {
  3223. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3224. object->instance = returnPtr;
  3225. object->owns = true;
  3226. luaL_getmetatable(state, "Vector3");
  3227. lua_setmetatable(state, -2);
  3228. }
  3229. else
  3230. {
  3231. lua_pushnil(state);
  3232. }
  3233. return 1;
  3234. }
  3235. else
  3236. {
  3237. lua_pushstring(state, "lua_Node_getUpVector - Failed to match the given parameters to a valid function signature.");
  3238. lua_error(state);
  3239. }
  3240. break;
  3241. }
  3242. case 2:
  3243. {
  3244. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3245. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3246. {
  3247. // Get parameter 1 off the stack.
  3248. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  3249. Node* instance = getInstance(state);
  3250. instance->getUpVector(param1);
  3251. return 0;
  3252. }
  3253. else
  3254. {
  3255. lua_pushstring(state, "lua_Node_getUpVector - Failed to match the given parameters to a valid function signature.");
  3256. lua_error(state);
  3257. }
  3258. break;
  3259. }
  3260. default:
  3261. {
  3262. lua_pushstring(state, "Invalid number of parameters (expected 1 or 2).");
  3263. lua_error(state);
  3264. break;
  3265. }
  3266. }
  3267. return 0;
  3268. }
  3269. int lua_Node_getUpVectorWorld(lua_State* state)
  3270. {
  3271. // Get the number of parameters.
  3272. int paramCount = lua_gettop(state);
  3273. // Attempt to match the parameters to a valid binding.
  3274. switch (paramCount)
  3275. {
  3276. case 1:
  3277. {
  3278. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3279. {
  3280. Node* instance = getInstance(state);
  3281. void* returnPtr = (void*)new Vector3(instance->getUpVectorWorld());
  3282. if (returnPtr)
  3283. {
  3284. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3285. object->instance = returnPtr;
  3286. object->owns = true;
  3287. luaL_getmetatable(state, "Vector3");
  3288. lua_setmetatable(state, -2);
  3289. }
  3290. else
  3291. {
  3292. lua_pushnil(state);
  3293. }
  3294. return 1;
  3295. }
  3296. else
  3297. {
  3298. lua_pushstring(state, "lua_Node_getUpVectorWorld - Failed to match the given parameters to a valid function signature.");
  3299. lua_error(state);
  3300. }
  3301. break;
  3302. }
  3303. default:
  3304. {
  3305. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3306. lua_error(state);
  3307. break;
  3308. }
  3309. }
  3310. return 0;
  3311. }
  3312. int lua_Node_getViewMatrix(lua_State* state)
  3313. {
  3314. // Get the number of parameters.
  3315. int paramCount = lua_gettop(state);
  3316. // Attempt to match the parameters to a valid binding.
  3317. switch (paramCount)
  3318. {
  3319. case 1:
  3320. {
  3321. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3322. {
  3323. Node* instance = getInstance(state);
  3324. void* returnPtr = (void*)&(instance->getViewMatrix());
  3325. if (returnPtr)
  3326. {
  3327. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3328. object->instance = returnPtr;
  3329. object->owns = false;
  3330. luaL_getmetatable(state, "Matrix");
  3331. lua_setmetatable(state, -2);
  3332. }
  3333. else
  3334. {
  3335. lua_pushnil(state);
  3336. }
  3337. return 1;
  3338. }
  3339. else
  3340. {
  3341. lua_pushstring(state, "lua_Node_getViewMatrix - Failed to match the given parameters to a valid function signature.");
  3342. lua_error(state);
  3343. }
  3344. break;
  3345. }
  3346. default:
  3347. {
  3348. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3349. lua_error(state);
  3350. break;
  3351. }
  3352. }
  3353. return 0;
  3354. }
  3355. int lua_Node_getViewProjectionMatrix(lua_State* state)
  3356. {
  3357. // Get the number of parameters.
  3358. int paramCount = lua_gettop(state);
  3359. // Attempt to match the parameters to a valid binding.
  3360. switch (paramCount)
  3361. {
  3362. case 1:
  3363. {
  3364. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3365. {
  3366. Node* instance = getInstance(state);
  3367. void* returnPtr = (void*)&(instance->getViewProjectionMatrix());
  3368. if (returnPtr)
  3369. {
  3370. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3371. object->instance = returnPtr;
  3372. object->owns = false;
  3373. luaL_getmetatable(state, "Matrix");
  3374. lua_setmetatable(state, -2);
  3375. }
  3376. else
  3377. {
  3378. lua_pushnil(state);
  3379. }
  3380. return 1;
  3381. }
  3382. else
  3383. {
  3384. lua_pushstring(state, "lua_Node_getViewProjectionMatrix - Failed to match the given parameters to a valid function signature.");
  3385. lua_error(state);
  3386. }
  3387. break;
  3388. }
  3389. default:
  3390. {
  3391. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3392. lua_error(state);
  3393. break;
  3394. }
  3395. }
  3396. return 0;
  3397. }
  3398. int lua_Node_getWorldMatrix(lua_State* state)
  3399. {
  3400. // Get the number of parameters.
  3401. int paramCount = lua_gettop(state);
  3402. // Attempt to match the parameters to a valid binding.
  3403. switch (paramCount)
  3404. {
  3405. case 1:
  3406. {
  3407. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3408. {
  3409. Node* instance = getInstance(state);
  3410. void* returnPtr = (void*)&(instance->getWorldMatrix());
  3411. if (returnPtr)
  3412. {
  3413. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3414. object->instance = returnPtr;
  3415. object->owns = false;
  3416. luaL_getmetatable(state, "Matrix");
  3417. lua_setmetatable(state, -2);
  3418. }
  3419. else
  3420. {
  3421. lua_pushnil(state);
  3422. }
  3423. return 1;
  3424. }
  3425. else
  3426. {
  3427. lua_pushstring(state, "lua_Node_getWorldMatrix - Failed to match the given parameters to a valid function signature.");
  3428. lua_error(state);
  3429. }
  3430. break;
  3431. }
  3432. default:
  3433. {
  3434. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3435. lua_error(state);
  3436. break;
  3437. }
  3438. }
  3439. return 0;
  3440. }
  3441. int lua_Node_getWorldViewMatrix(lua_State* state)
  3442. {
  3443. // Get the number of parameters.
  3444. int paramCount = lua_gettop(state);
  3445. // Attempt to match the parameters to a valid binding.
  3446. switch (paramCount)
  3447. {
  3448. case 1:
  3449. {
  3450. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3451. {
  3452. Node* instance = getInstance(state);
  3453. void* returnPtr = (void*)&(instance->getWorldViewMatrix());
  3454. if (returnPtr)
  3455. {
  3456. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3457. object->instance = returnPtr;
  3458. object->owns = false;
  3459. luaL_getmetatable(state, "Matrix");
  3460. lua_setmetatable(state, -2);
  3461. }
  3462. else
  3463. {
  3464. lua_pushnil(state);
  3465. }
  3466. return 1;
  3467. }
  3468. else
  3469. {
  3470. lua_pushstring(state, "lua_Node_getWorldViewMatrix - Failed to match the given parameters to a valid function signature.");
  3471. lua_error(state);
  3472. }
  3473. break;
  3474. }
  3475. default:
  3476. {
  3477. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3478. lua_error(state);
  3479. break;
  3480. }
  3481. }
  3482. return 0;
  3483. }
  3484. int lua_Node_getWorldViewProjectionMatrix(lua_State* state)
  3485. {
  3486. // Get the number of parameters.
  3487. int paramCount = lua_gettop(state);
  3488. // Attempt to match the parameters to a valid binding.
  3489. switch (paramCount)
  3490. {
  3491. case 1:
  3492. {
  3493. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3494. {
  3495. Node* instance = getInstance(state);
  3496. void* returnPtr = (void*)&(instance->getWorldViewProjectionMatrix());
  3497. if (returnPtr)
  3498. {
  3499. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  3500. object->instance = returnPtr;
  3501. object->owns = false;
  3502. luaL_getmetatable(state, "Matrix");
  3503. lua_setmetatable(state, -2);
  3504. }
  3505. else
  3506. {
  3507. lua_pushnil(state);
  3508. }
  3509. return 1;
  3510. }
  3511. else
  3512. {
  3513. lua_pushstring(state, "lua_Node_getWorldViewProjectionMatrix - Failed to match the given parameters to a valid function signature.");
  3514. lua_error(state);
  3515. }
  3516. break;
  3517. }
  3518. default:
  3519. {
  3520. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3521. lua_error(state);
  3522. break;
  3523. }
  3524. }
  3525. return 0;
  3526. }
  3527. int lua_Node_hasTag(lua_State* state)
  3528. {
  3529. // Get the number of parameters.
  3530. int paramCount = lua_gettop(state);
  3531. // Attempt to match the parameters to a valid binding.
  3532. switch (paramCount)
  3533. {
  3534. case 2:
  3535. {
  3536. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3537. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  3538. {
  3539. // Get parameter 1 off the stack.
  3540. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  3541. Node* instance = getInstance(state);
  3542. bool result = instance->hasTag(param1);
  3543. // Push the return value onto the stack.
  3544. lua_pushboolean(state, result);
  3545. return 1;
  3546. }
  3547. else
  3548. {
  3549. lua_pushstring(state, "lua_Node_hasTag - Failed to match the given parameters to a valid function signature.");
  3550. lua_error(state);
  3551. }
  3552. break;
  3553. }
  3554. default:
  3555. {
  3556. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3557. lua_error(state);
  3558. break;
  3559. }
  3560. }
  3561. return 0;
  3562. }
  3563. int lua_Node_release(lua_State* state)
  3564. {
  3565. // Get the number of parameters.
  3566. int paramCount = lua_gettop(state);
  3567. // Attempt to match the parameters to a valid binding.
  3568. switch (paramCount)
  3569. {
  3570. case 1:
  3571. {
  3572. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3573. {
  3574. Node* instance = getInstance(state);
  3575. instance->release();
  3576. return 0;
  3577. }
  3578. else
  3579. {
  3580. lua_pushstring(state, "lua_Node_release - Failed to match the given parameters to a valid function signature.");
  3581. lua_error(state);
  3582. }
  3583. break;
  3584. }
  3585. default:
  3586. {
  3587. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3588. lua_error(state);
  3589. break;
  3590. }
  3591. }
  3592. return 0;
  3593. }
  3594. int lua_Node_removeAllChildren(lua_State* state)
  3595. {
  3596. // Get the number of parameters.
  3597. int paramCount = lua_gettop(state);
  3598. // Attempt to match the parameters to a valid binding.
  3599. switch (paramCount)
  3600. {
  3601. case 1:
  3602. {
  3603. if ((lua_type(state, 1) == LUA_TUSERDATA))
  3604. {
  3605. Node* instance = getInstance(state);
  3606. instance->removeAllChildren();
  3607. return 0;
  3608. }
  3609. else
  3610. {
  3611. lua_pushstring(state, "lua_Node_removeAllChildren - Failed to match the given parameters to a valid function signature.");
  3612. lua_error(state);
  3613. }
  3614. break;
  3615. }
  3616. default:
  3617. {
  3618. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  3619. lua_error(state);
  3620. break;
  3621. }
  3622. }
  3623. return 0;
  3624. }
  3625. int lua_Node_removeChild(lua_State* state)
  3626. {
  3627. // Get the number of parameters.
  3628. int paramCount = lua_gettop(state);
  3629. // Attempt to match the parameters to a valid binding.
  3630. switch (paramCount)
  3631. {
  3632. case 2:
  3633. {
  3634. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3635. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3636. {
  3637. // Get parameter 1 off the stack.
  3638. ScriptUtil::LuaArray<Node> param1 = ScriptUtil::getObjectPointer<Node>(2, "Node", false);
  3639. Node* instance = getInstance(state);
  3640. instance->removeChild(param1);
  3641. return 0;
  3642. }
  3643. else
  3644. {
  3645. lua_pushstring(state, "lua_Node_removeChild - Failed to match the given parameters to a valid function signature.");
  3646. lua_error(state);
  3647. }
  3648. break;
  3649. }
  3650. default:
  3651. {
  3652. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3653. lua_error(state);
  3654. break;
  3655. }
  3656. }
  3657. return 0;
  3658. }
  3659. int lua_Node_removeListener(lua_State* state)
  3660. {
  3661. // Get the number of parameters.
  3662. int paramCount = lua_gettop(state);
  3663. // Attempt to match the parameters to a valid binding.
  3664. switch (paramCount)
  3665. {
  3666. case 2:
  3667. {
  3668. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3669. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  3670. {
  3671. // Get parameter 1 off the stack.
  3672. ScriptUtil::LuaArray<Transform::Listener> param1 = ScriptUtil::getObjectPointer<Transform::Listener>(2, "TransformListener", false);
  3673. Node* instance = getInstance(state);
  3674. instance->removeListener(param1);
  3675. return 0;
  3676. }
  3677. else
  3678. {
  3679. lua_pushstring(state, "lua_Node_removeListener - Failed to match the given parameters to a valid function signature.");
  3680. lua_error(state);
  3681. }
  3682. break;
  3683. }
  3684. default:
  3685. {
  3686. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3687. lua_error(state);
  3688. break;
  3689. }
  3690. }
  3691. return 0;
  3692. }
  3693. int lua_Node_removeScriptCallback(lua_State* state)
  3694. {
  3695. // Get the number of parameters.
  3696. int paramCount = lua_gettop(state);
  3697. // Attempt to match the parameters to a valid binding.
  3698. switch (paramCount)
  3699. {
  3700. case 3:
  3701. {
  3702. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3703. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  3704. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  3705. {
  3706. // Get parameter 1 off the stack.
  3707. std::string param1 = ScriptUtil::getString(2, true);
  3708. // Get parameter 2 off the stack.
  3709. std::string param2 = ScriptUtil::getString(3, true);
  3710. Node* instance = getInstance(state);
  3711. instance->removeScriptCallback(param1, param2);
  3712. return 0;
  3713. }
  3714. else
  3715. {
  3716. lua_pushstring(state, "lua_Node_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  3717. lua_error(state);
  3718. }
  3719. break;
  3720. }
  3721. default:
  3722. {
  3723. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  3724. lua_error(state);
  3725. break;
  3726. }
  3727. }
  3728. return 0;
  3729. }
  3730. int lua_Node_rotate(lua_State* state)
  3731. {
  3732. // Get the number of parameters.
  3733. int paramCount = lua_gettop(state);
  3734. // Attempt to match the parameters to a valid binding.
  3735. switch (paramCount)
  3736. {
  3737. case 2:
  3738. {
  3739. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3740. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3741. {
  3742. // Get parameter 1 off the stack.
  3743. ScriptUtil::LuaArray<Quaternion> param1 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true);
  3744. Node* instance = getInstance(state);
  3745. instance->rotate(*param1);
  3746. return 0;
  3747. }
  3748. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3749. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3750. {
  3751. // Get parameter 1 off the stack.
  3752. ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true);
  3753. Node* instance = getInstance(state);
  3754. instance->rotate(*param1);
  3755. return 0;
  3756. }
  3757. else
  3758. {
  3759. lua_pushstring(state, "lua_Node_rotate - Failed to match the given parameters to a valid function signature.");
  3760. lua_error(state);
  3761. }
  3762. break;
  3763. }
  3764. case 3:
  3765. {
  3766. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3767. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  3768. lua_type(state, 3) == LUA_TNUMBER)
  3769. {
  3770. // Get parameter 1 off the stack.
  3771. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  3772. // Get parameter 2 off the stack.
  3773. float param2 = (float)luaL_checknumber(state, 3);
  3774. Node* instance = getInstance(state);
  3775. instance->rotate(*param1, param2);
  3776. return 0;
  3777. }
  3778. else
  3779. {
  3780. lua_pushstring(state, "lua_Node_rotate - Failed to match the given parameters to a valid function signature.");
  3781. lua_error(state);
  3782. }
  3783. break;
  3784. }
  3785. case 5:
  3786. {
  3787. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3788. lua_type(state, 2) == LUA_TNUMBER &&
  3789. lua_type(state, 3) == LUA_TNUMBER &&
  3790. lua_type(state, 4) == LUA_TNUMBER &&
  3791. lua_type(state, 5) == LUA_TNUMBER)
  3792. {
  3793. // Get parameter 1 off the stack.
  3794. float param1 = (float)luaL_checknumber(state, 2);
  3795. // Get parameter 2 off the stack.
  3796. float param2 = (float)luaL_checknumber(state, 3);
  3797. // Get parameter 3 off the stack.
  3798. float param3 = (float)luaL_checknumber(state, 4);
  3799. // Get parameter 4 off the stack.
  3800. float param4 = (float)luaL_checknumber(state, 5);
  3801. Node* instance = getInstance(state);
  3802. instance->rotate(param1, param2, param3, param4);
  3803. return 0;
  3804. }
  3805. else
  3806. {
  3807. lua_pushstring(state, "lua_Node_rotate - Failed to match the given parameters to a valid function signature.");
  3808. lua_error(state);
  3809. }
  3810. break;
  3811. }
  3812. default:
  3813. {
  3814. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 5).");
  3815. lua_error(state);
  3816. break;
  3817. }
  3818. }
  3819. return 0;
  3820. }
  3821. int lua_Node_rotateX(lua_State* state)
  3822. {
  3823. // Get the number of parameters.
  3824. int paramCount = lua_gettop(state);
  3825. // Attempt to match the parameters to a valid binding.
  3826. switch (paramCount)
  3827. {
  3828. case 2:
  3829. {
  3830. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3831. lua_type(state, 2) == LUA_TNUMBER)
  3832. {
  3833. // Get parameter 1 off the stack.
  3834. float param1 = (float)luaL_checknumber(state, 2);
  3835. Node* instance = getInstance(state);
  3836. instance->rotateX(param1);
  3837. return 0;
  3838. }
  3839. else
  3840. {
  3841. lua_pushstring(state, "lua_Node_rotateX - Failed to match the given parameters to a valid function signature.");
  3842. lua_error(state);
  3843. }
  3844. break;
  3845. }
  3846. default:
  3847. {
  3848. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3849. lua_error(state);
  3850. break;
  3851. }
  3852. }
  3853. return 0;
  3854. }
  3855. int lua_Node_rotateY(lua_State* state)
  3856. {
  3857. // Get the number of parameters.
  3858. int paramCount = lua_gettop(state);
  3859. // Attempt to match the parameters to a valid binding.
  3860. switch (paramCount)
  3861. {
  3862. case 2:
  3863. {
  3864. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3865. lua_type(state, 2) == LUA_TNUMBER)
  3866. {
  3867. // Get parameter 1 off the stack.
  3868. float param1 = (float)luaL_checknumber(state, 2);
  3869. Node* instance = getInstance(state);
  3870. instance->rotateY(param1);
  3871. return 0;
  3872. }
  3873. else
  3874. {
  3875. lua_pushstring(state, "lua_Node_rotateY - Failed to match the given parameters to a valid function signature.");
  3876. lua_error(state);
  3877. }
  3878. break;
  3879. }
  3880. default:
  3881. {
  3882. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3883. lua_error(state);
  3884. break;
  3885. }
  3886. }
  3887. return 0;
  3888. }
  3889. int lua_Node_rotateZ(lua_State* state)
  3890. {
  3891. // Get the number of parameters.
  3892. int paramCount = lua_gettop(state);
  3893. // Attempt to match the parameters to a valid binding.
  3894. switch (paramCount)
  3895. {
  3896. case 2:
  3897. {
  3898. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3899. lua_type(state, 2) == LUA_TNUMBER)
  3900. {
  3901. // Get parameter 1 off the stack.
  3902. float param1 = (float)luaL_checknumber(state, 2);
  3903. Node* instance = getInstance(state);
  3904. instance->rotateZ(param1);
  3905. return 0;
  3906. }
  3907. else
  3908. {
  3909. lua_pushstring(state, "lua_Node_rotateZ - Failed to match the given parameters to a valid function signature.");
  3910. lua_error(state);
  3911. }
  3912. break;
  3913. }
  3914. default:
  3915. {
  3916. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  3917. lua_error(state);
  3918. break;
  3919. }
  3920. }
  3921. return 0;
  3922. }
  3923. int lua_Node_scale(lua_State* state)
  3924. {
  3925. // Get the number of parameters.
  3926. int paramCount = lua_gettop(state);
  3927. // Attempt to match the parameters to a valid binding.
  3928. switch (paramCount)
  3929. {
  3930. case 2:
  3931. {
  3932. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3933. lua_type(state, 2) == LUA_TNUMBER)
  3934. {
  3935. // Get parameter 1 off the stack.
  3936. float param1 = (float)luaL_checknumber(state, 2);
  3937. Node* instance = getInstance(state);
  3938. instance->scale(param1);
  3939. return 0;
  3940. }
  3941. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3942. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  3943. {
  3944. // Get parameter 1 off the stack.
  3945. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  3946. Node* instance = getInstance(state);
  3947. instance->scale(*param1);
  3948. return 0;
  3949. }
  3950. else
  3951. {
  3952. lua_pushstring(state, "lua_Node_scale - Failed to match the given parameters to a valid function signature.");
  3953. lua_error(state);
  3954. }
  3955. break;
  3956. }
  3957. case 4:
  3958. {
  3959. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  3960. lua_type(state, 2) == LUA_TNUMBER &&
  3961. lua_type(state, 3) == LUA_TNUMBER &&
  3962. lua_type(state, 4) == LUA_TNUMBER)
  3963. {
  3964. // Get parameter 1 off the stack.
  3965. float param1 = (float)luaL_checknumber(state, 2);
  3966. // Get parameter 2 off the stack.
  3967. float param2 = (float)luaL_checknumber(state, 3);
  3968. // Get parameter 3 off the stack.
  3969. float param3 = (float)luaL_checknumber(state, 4);
  3970. Node* instance = getInstance(state);
  3971. instance->scale(param1, param2, param3);
  3972. return 0;
  3973. }
  3974. else
  3975. {
  3976. lua_pushstring(state, "lua_Node_scale - Failed to match the given parameters to a valid function signature.");
  3977. lua_error(state);
  3978. }
  3979. break;
  3980. }
  3981. default:
  3982. {
  3983. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  3984. lua_error(state);
  3985. break;
  3986. }
  3987. }
  3988. return 0;
  3989. }
  3990. int lua_Node_scaleX(lua_State* state)
  3991. {
  3992. // Get the number of parameters.
  3993. int paramCount = lua_gettop(state);
  3994. // Attempt to match the parameters to a valid binding.
  3995. switch (paramCount)
  3996. {
  3997. case 2:
  3998. {
  3999. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4000. lua_type(state, 2) == LUA_TNUMBER)
  4001. {
  4002. // Get parameter 1 off the stack.
  4003. float param1 = (float)luaL_checknumber(state, 2);
  4004. Node* instance = getInstance(state);
  4005. instance->scaleX(param1);
  4006. return 0;
  4007. }
  4008. else
  4009. {
  4010. lua_pushstring(state, "lua_Node_scaleX - Failed to match the given parameters to a valid function signature.");
  4011. lua_error(state);
  4012. }
  4013. break;
  4014. }
  4015. default:
  4016. {
  4017. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4018. lua_error(state);
  4019. break;
  4020. }
  4021. }
  4022. return 0;
  4023. }
  4024. int lua_Node_scaleY(lua_State* state)
  4025. {
  4026. // Get the number of parameters.
  4027. int paramCount = lua_gettop(state);
  4028. // Attempt to match the parameters to a valid binding.
  4029. switch (paramCount)
  4030. {
  4031. case 2:
  4032. {
  4033. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4034. lua_type(state, 2) == LUA_TNUMBER)
  4035. {
  4036. // Get parameter 1 off the stack.
  4037. float param1 = (float)luaL_checknumber(state, 2);
  4038. Node* instance = getInstance(state);
  4039. instance->scaleY(param1);
  4040. return 0;
  4041. }
  4042. else
  4043. {
  4044. lua_pushstring(state, "lua_Node_scaleY - Failed to match the given parameters to a valid function signature.");
  4045. lua_error(state);
  4046. }
  4047. break;
  4048. }
  4049. default:
  4050. {
  4051. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4052. lua_error(state);
  4053. break;
  4054. }
  4055. }
  4056. return 0;
  4057. }
  4058. int lua_Node_scaleZ(lua_State* state)
  4059. {
  4060. // Get the number of parameters.
  4061. int paramCount = lua_gettop(state);
  4062. // Attempt to match the parameters to a valid binding.
  4063. switch (paramCount)
  4064. {
  4065. case 2:
  4066. {
  4067. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4068. lua_type(state, 2) == LUA_TNUMBER)
  4069. {
  4070. // Get parameter 1 off the stack.
  4071. float param1 = (float)luaL_checknumber(state, 2);
  4072. Node* instance = getInstance(state);
  4073. instance->scaleZ(param1);
  4074. return 0;
  4075. }
  4076. else
  4077. {
  4078. lua_pushstring(state, "lua_Node_scaleZ - Failed to match the given parameters to a valid function signature.");
  4079. lua_error(state);
  4080. }
  4081. break;
  4082. }
  4083. default:
  4084. {
  4085. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4086. lua_error(state);
  4087. break;
  4088. }
  4089. }
  4090. return 0;
  4091. }
  4092. int lua_Node_set(lua_State* state)
  4093. {
  4094. // Get the number of parameters.
  4095. int paramCount = lua_gettop(state);
  4096. // Attempt to match the parameters to a valid binding.
  4097. switch (paramCount)
  4098. {
  4099. case 2:
  4100. {
  4101. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4102. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4103. {
  4104. // Get parameter 1 off the stack.
  4105. ScriptUtil::LuaArray<Transform> param1 = ScriptUtil::getObjectPointer<Transform>(2, "Transform", true);
  4106. Node* instance = getInstance(state);
  4107. instance->set(*param1);
  4108. return 0;
  4109. }
  4110. else
  4111. {
  4112. lua_pushstring(state, "lua_Node_set - Failed to match the given parameters to a valid function signature.");
  4113. lua_error(state);
  4114. }
  4115. break;
  4116. }
  4117. case 4:
  4118. {
  4119. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4120. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4121. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4122. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
  4123. {
  4124. // Get parameter 1 off the stack.
  4125. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  4126. // Get parameter 2 off the stack.
  4127. ScriptUtil::LuaArray<Quaternion> param2 = ScriptUtil::getObjectPointer<Quaternion>(3, "Quaternion", true);
  4128. // Get parameter 3 off the stack.
  4129. ScriptUtil::LuaArray<Vector3> param3 = ScriptUtil::getObjectPointer<Vector3>(4, "Vector3", true);
  4130. Node* instance = getInstance(state);
  4131. instance->set(*param1, *param2, *param3);
  4132. return 0;
  4133. }
  4134. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4135. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4136. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4137. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
  4138. {
  4139. // Get parameter 1 off the stack.
  4140. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  4141. // Get parameter 2 off the stack.
  4142. ScriptUtil::LuaArray<Matrix> param2 = ScriptUtil::getObjectPointer<Matrix>(3, "Matrix", true);
  4143. // Get parameter 3 off the stack.
  4144. ScriptUtil::LuaArray<Vector3> param3 = ScriptUtil::getObjectPointer<Vector3>(4, "Vector3", true);
  4145. Node* instance = getInstance(state);
  4146. instance->set(*param1, *param2, *param3);
  4147. return 0;
  4148. }
  4149. else
  4150. {
  4151. lua_pushstring(state, "lua_Node_set - Failed to match the given parameters to a valid function signature.");
  4152. lua_error(state);
  4153. }
  4154. break;
  4155. }
  4156. case 5:
  4157. {
  4158. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4159. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4160. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4161. lua_type(state, 4) == LUA_TNUMBER &&
  4162. (lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TNIL))
  4163. {
  4164. // Get parameter 1 off the stack.
  4165. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  4166. // Get parameter 2 off the stack.
  4167. ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", true);
  4168. // Get parameter 3 off the stack.
  4169. float param3 = (float)luaL_checknumber(state, 4);
  4170. // Get parameter 4 off the stack.
  4171. ScriptUtil::LuaArray<Vector3> param4 = ScriptUtil::getObjectPointer<Vector3>(5, "Vector3", true);
  4172. Node* instance = getInstance(state);
  4173. instance->set(*param1, *param2, param3, *param4);
  4174. return 0;
  4175. }
  4176. else
  4177. {
  4178. lua_pushstring(state, "lua_Node_set - Failed to match the given parameters to a valid function signature.");
  4179. lua_error(state);
  4180. }
  4181. break;
  4182. }
  4183. default:
  4184. {
  4185. lua_pushstring(state, "Invalid number of parameters (expected 2, 4 or 5).");
  4186. lua_error(state);
  4187. break;
  4188. }
  4189. }
  4190. return 0;
  4191. }
  4192. int lua_Node_setAgent(lua_State* state)
  4193. {
  4194. // Get the number of parameters.
  4195. int paramCount = lua_gettop(state);
  4196. // Attempt to match the parameters to a valid binding.
  4197. switch (paramCount)
  4198. {
  4199. case 2:
  4200. {
  4201. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4202. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4203. {
  4204. // Get parameter 1 off the stack.
  4205. ScriptUtil::LuaArray<AIAgent> param1 = ScriptUtil::getObjectPointer<AIAgent>(2, "AIAgent", false);
  4206. Node* instance = getInstance(state);
  4207. instance->setAgent(param1);
  4208. return 0;
  4209. }
  4210. else
  4211. {
  4212. lua_pushstring(state, "lua_Node_setAgent - Failed to match the given parameters to a valid function signature.");
  4213. lua_error(state);
  4214. }
  4215. break;
  4216. }
  4217. default:
  4218. {
  4219. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4220. lua_error(state);
  4221. break;
  4222. }
  4223. }
  4224. return 0;
  4225. }
  4226. int lua_Node_setAnimationPropertyValue(lua_State* state)
  4227. {
  4228. // Get the number of parameters.
  4229. int paramCount = lua_gettop(state);
  4230. // Attempt to match the parameters to a valid binding.
  4231. switch (paramCount)
  4232. {
  4233. case 3:
  4234. {
  4235. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4236. lua_type(state, 2) == LUA_TNUMBER &&
  4237. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  4238. {
  4239. // Get parameter 1 off the stack.
  4240. int param1 = (int)luaL_checkint(state, 2);
  4241. // Get parameter 2 off the stack.
  4242. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  4243. Node* instance = getInstance(state);
  4244. instance->setAnimationPropertyValue(param1, param2);
  4245. return 0;
  4246. }
  4247. else
  4248. {
  4249. lua_pushstring(state, "lua_Node_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  4250. lua_error(state);
  4251. }
  4252. break;
  4253. }
  4254. case 4:
  4255. {
  4256. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4257. lua_type(state, 2) == LUA_TNUMBER &&
  4258. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) &&
  4259. lua_type(state, 4) == LUA_TNUMBER)
  4260. {
  4261. // Get parameter 1 off the stack.
  4262. int param1 = (int)luaL_checkint(state, 2);
  4263. // Get parameter 2 off the stack.
  4264. ScriptUtil::LuaArray<AnimationValue> param2 = ScriptUtil::getObjectPointer<AnimationValue>(3, "AnimationValue", false);
  4265. // Get parameter 3 off the stack.
  4266. float param3 = (float)luaL_checknumber(state, 4);
  4267. Node* instance = getInstance(state);
  4268. instance->setAnimationPropertyValue(param1, param2, param3);
  4269. return 0;
  4270. }
  4271. else
  4272. {
  4273. lua_pushstring(state, "lua_Node_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature.");
  4274. lua_error(state);
  4275. }
  4276. break;
  4277. }
  4278. default:
  4279. {
  4280. lua_pushstring(state, "Invalid number of parameters (expected 3 or 4).");
  4281. lua_error(state);
  4282. break;
  4283. }
  4284. }
  4285. return 0;
  4286. }
  4287. int lua_Node_setAudioSource(lua_State* state)
  4288. {
  4289. // Get the number of parameters.
  4290. int paramCount = lua_gettop(state);
  4291. // Attempt to match the parameters to a valid binding.
  4292. switch (paramCount)
  4293. {
  4294. case 2:
  4295. {
  4296. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4297. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4298. {
  4299. // Get parameter 1 off the stack.
  4300. ScriptUtil::LuaArray<AudioSource> param1 = ScriptUtil::getObjectPointer<AudioSource>(2, "AudioSource", false);
  4301. Node* instance = getInstance(state);
  4302. instance->setAudioSource(param1);
  4303. return 0;
  4304. }
  4305. else
  4306. {
  4307. lua_pushstring(state, "lua_Node_setAudioSource - Failed to match the given parameters to a valid function signature.");
  4308. lua_error(state);
  4309. }
  4310. break;
  4311. }
  4312. default:
  4313. {
  4314. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4315. lua_error(state);
  4316. break;
  4317. }
  4318. }
  4319. return 0;
  4320. }
  4321. int lua_Node_setCamera(lua_State* state)
  4322. {
  4323. // Get the number of parameters.
  4324. int paramCount = lua_gettop(state);
  4325. // Attempt to match the parameters to a valid binding.
  4326. switch (paramCount)
  4327. {
  4328. case 2:
  4329. {
  4330. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4331. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4332. {
  4333. // Get parameter 1 off the stack.
  4334. ScriptUtil::LuaArray<Camera> param1 = ScriptUtil::getObjectPointer<Camera>(2, "Camera", false);
  4335. Node* instance = getInstance(state);
  4336. instance->setCamera(param1);
  4337. return 0;
  4338. }
  4339. else
  4340. {
  4341. lua_pushstring(state, "lua_Node_setCamera - Failed to match the given parameters to a valid function signature.");
  4342. lua_error(state);
  4343. }
  4344. break;
  4345. }
  4346. default:
  4347. {
  4348. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4349. lua_error(state);
  4350. break;
  4351. }
  4352. }
  4353. return 0;
  4354. }
  4355. int lua_Node_setCollisionObject(lua_State* state)
  4356. {
  4357. // Get the number of parameters.
  4358. int paramCount = lua_gettop(state);
  4359. // Attempt to match the parameters to a valid binding.
  4360. switch (paramCount)
  4361. {
  4362. case 2:
  4363. {
  4364. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4365. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4366. {
  4367. // Get parameter 1 off the stack.
  4368. PhysicsCollisionObject::Type param1 = (PhysicsCollisionObject::Type)lua_enumFromString_PhysicsCollisionObjectType(luaL_checkstring(state, 2));
  4369. Node* instance = getInstance(state);
  4370. void* returnPtr = (void*)instance->setCollisionObject(param1);
  4371. if (returnPtr)
  4372. {
  4373. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4374. object->instance = returnPtr;
  4375. object->owns = false;
  4376. luaL_getmetatable(state, "PhysicsCollisionObject");
  4377. lua_setmetatable(state, -2);
  4378. }
  4379. else
  4380. {
  4381. lua_pushnil(state);
  4382. }
  4383. return 1;
  4384. }
  4385. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4386. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4387. {
  4388. // Get parameter 1 off the stack.
  4389. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  4390. Node* instance = getInstance(state);
  4391. void* returnPtr = (void*)instance->setCollisionObject(param1);
  4392. if (returnPtr)
  4393. {
  4394. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4395. object->instance = returnPtr;
  4396. object->owns = false;
  4397. luaL_getmetatable(state, "PhysicsCollisionObject");
  4398. lua_setmetatable(state, -2);
  4399. }
  4400. else
  4401. {
  4402. lua_pushnil(state);
  4403. }
  4404. return 1;
  4405. }
  4406. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4407. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4408. {
  4409. // Get parameter 1 off the stack.
  4410. ScriptUtil::LuaArray<Properties> param1 = ScriptUtil::getObjectPointer<Properties>(2, "Properties", false);
  4411. Node* instance = getInstance(state);
  4412. void* returnPtr = (void*)instance->setCollisionObject(param1);
  4413. if (returnPtr)
  4414. {
  4415. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4416. object->instance = returnPtr;
  4417. object->owns = false;
  4418. luaL_getmetatable(state, "PhysicsCollisionObject");
  4419. lua_setmetatable(state, -2);
  4420. }
  4421. else
  4422. {
  4423. lua_pushnil(state);
  4424. }
  4425. return 1;
  4426. }
  4427. else
  4428. {
  4429. lua_pushstring(state, "lua_Node_setCollisionObject - Failed to match the given parameters to a valid function signature.");
  4430. lua_error(state);
  4431. }
  4432. break;
  4433. }
  4434. case 3:
  4435. {
  4436. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4437. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4438. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL))
  4439. {
  4440. // Get parameter 1 off the stack.
  4441. PhysicsCollisionObject::Type param1 = (PhysicsCollisionObject::Type)lua_enumFromString_PhysicsCollisionObjectType(luaL_checkstring(state, 2));
  4442. // Get parameter 2 off the stack.
  4443. ScriptUtil::LuaArray<PhysicsCollisionShape::Definition> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionShape::Definition>(3, "PhysicsCollisionShapeDefinition", true);
  4444. Node* instance = getInstance(state);
  4445. void* returnPtr = (void*)instance->setCollisionObject(param1, *param2);
  4446. if (returnPtr)
  4447. {
  4448. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4449. object->instance = returnPtr;
  4450. object->owns = false;
  4451. luaL_getmetatable(state, "PhysicsCollisionObject");
  4452. lua_setmetatable(state, -2);
  4453. }
  4454. else
  4455. {
  4456. lua_pushnil(state);
  4457. }
  4458. return 1;
  4459. }
  4460. else
  4461. {
  4462. lua_pushstring(state, "lua_Node_setCollisionObject - Failed to match the given parameters to a valid function signature.");
  4463. lua_error(state);
  4464. }
  4465. break;
  4466. }
  4467. case 4:
  4468. {
  4469. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4470. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  4471. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) &&
  4472. (lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TNIL))
  4473. {
  4474. // Get parameter 1 off the stack.
  4475. PhysicsCollisionObject::Type param1 = (PhysicsCollisionObject::Type)lua_enumFromString_PhysicsCollisionObjectType(luaL_checkstring(state, 2));
  4476. // Get parameter 2 off the stack.
  4477. ScriptUtil::LuaArray<PhysicsCollisionShape::Definition> param2 = ScriptUtil::getObjectPointer<PhysicsCollisionShape::Definition>(3, "PhysicsCollisionShapeDefinition", true);
  4478. // Get parameter 3 off the stack.
  4479. ScriptUtil::LuaArray<PhysicsRigidBody::Parameters> param3 = ScriptUtil::getObjectPointer<PhysicsRigidBody::Parameters>(4, "PhysicsRigidBodyParameters", false);
  4480. Node* instance = getInstance(state);
  4481. void* returnPtr = (void*)instance->setCollisionObject(param1, *param2, param3);
  4482. if (returnPtr)
  4483. {
  4484. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  4485. object->instance = returnPtr;
  4486. object->owns = false;
  4487. luaL_getmetatable(state, "PhysicsCollisionObject");
  4488. lua_setmetatable(state, -2);
  4489. }
  4490. else
  4491. {
  4492. lua_pushnil(state);
  4493. }
  4494. return 1;
  4495. }
  4496. else
  4497. {
  4498. lua_pushstring(state, "lua_Node_setCollisionObject - Failed to match the given parameters to a valid function signature.");
  4499. lua_error(state);
  4500. }
  4501. break;
  4502. }
  4503. default:
  4504. {
  4505. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 4).");
  4506. lua_error(state);
  4507. break;
  4508. }
  4509. }
  4510. return 0;
  4511. }
  4512. int lua_Node_setForm(lua_State* state)
  4513. {
  4514. // Get the number of parameters.
  4515. int paramCount = lua_gettop(state);
  4516. // Attempt to match the parameters to a valid binding.
  4517. switch (paramCount)
  4518. {
  4519. case 2:
  4520. {
  4521. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4522. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4523. {
  4524. // Get parameter 1 off the stack.
  4525. ScriptUtil::LuaArray<Form> param1 = ScriptUtil::getObjectPointer<Form>(2, "Form", false);
  4526. Node* instance = getInstance(state);
  4527. instance->setForm(param1);
  4528. return 0;
  4529. }
  4530. else
  4531. {
  4532. lua_pushstring(state, "lua_Node_setForm - Failed to match the given parameters to a valid function signature.");
  4533. lua_error(state);
  4534. }
  4535. break;
  4536. }
  4537. default:
  4538. {
  4539. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4540. lua_error(state);
  4541. break;
  4542. }
  4543. }
  4544. return 0;
  4545. }
  4546. int lua_Node_setId(lua_State* state)
  4547. {
  4548. // Get the number of parameters.
  4549. int paramCount = lua_gettop(state);
  4550. // Attempt to match the parameters to a valid binding.
  4551. switch (paramCount)
  4552. {
  4553. case 2:
  4554. {
  4555. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4556. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4557. {
  4558. // Get parameter 1 off the stack.
  4559. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  4560. Node* instance = getInstance(state);
  4561. instance->setId(param1);
  4562. return 0;
  4563. }
  4564. else
  4565. {
  4566. lua_pushstring(state, "lua_Node_setId - Failed to match the given parameters to a valid function signature.");
  4567. lua_error(state);
  4568. }
  4569. break;
  4570. }
  4571. default:
  4572. {
  4573. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4574. lua_error(state);
  4575. break;
  4576. }
  4577. }
  4578. return 0;
  4579. }
  4580. int lua_Node_setIdentity(lua_State* state)
  4581. {
  4582. // Get the number of parameters.
  4583. int paramCount = lua_gettop(state);
  4584. // Attempt to match the parameters to a valid binding.
  4585. switch (paramCount)
  4586. {
  4587. case 1:
  4588. {
  4589. if ((lua_type(state, 1) == LUA_TUSERDATA))
  4590. {
  4591. Node* instance = getInstance(state);
  4592. instance->setIdentity();
  4593. return 0;
  4594. }
  4595. else
  4596. {
  4597. lua_pushstring(state, "lua_Node_setIdentity - Failed to match the given parameters to a valid function signature.");
  4598. lua_error(state);
  4599. }
  4600. break;
  4601. }
  4602. default:
  4603. {
  4604. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  4605. lua_error(state);
  4606. break;
  4607. }
  4608. }
  4609. return 0;
  4610. }
  4611. int lua_Node_setLight(lua_State* state)
  4612. {
  4613. // Get the number of parameters.
  4614. int paramCount = lua_gettop(state);
  4615. // Attempt to match the parameters to a valid binding.
  4616. switch (paramCount)
  4617. {
  4618. case 2:
  4619. {
  4620. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4621. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4622. {
  4623. // Get parameter 1 off the stack.
  4624. ScriptUtil::LuaArray<Light> param1 = ScriptUtil::getObjectPointer<Light>(2, "Light", false);
  4625. Node* instance = getInstance(state);
  4626. instance->setLight(param1);
  4627. return 0;
  4628. }
  4629. else
  4630. {
  4631. lua_pushstring(state, "lua_Node_setLight - Failed to match the given parameters to a valid function signature.");
  4632. lua_error(state);
  4633. }
  4634. break;
  4635. }
  4636. default:
  4637. {
  4638. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4639. lua_error(state);
  4640. break;
  4641. }
  4642. }
  4643. return 0;
  4644. }
  4645. int lua_Node_setModel(lua_State* state)
  4646. {
  4647. // Get the number of parameters.
  4648. int paramCount = lua_gettop(state);
  4649. // Attempt to match the parameters to a valid binding.
  4650. switch (paramCount)
  4651. {
  4652. case 2:
  4653. {
  4654. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4655. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4656. {
  4657. // Get parameter 1 off the stack.
  4658. ScriptUtil::LuaArray<Model> param1 = ScriptUtil::getObjectPointer<Model>(2, "Model", false);
  4659. Node* instance = getInstance(state);
  4660. instance->setModel(param1);
  4661. return 0;
  4662. }
  4663. else
  4664. {
  4665. lua_pushstring(state, "lua_Node_setModel - Failed to match the given parameters to a valid function signature.");
  4666. lua_error(state);
  4667. }
  4668. break;
  4669. }
  4670. default:
  4671. {
  4672. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4673. lua_error(state);
  4674. break;
  4675. }
  4676. }
  4677. return 0;
  4678. }
  4679. int lua_Node_setParticleEmitter(lua_State* state)
  4680. {
  4681. // Get the number of parameters.
  4682. int paramCount = lua_gettop(state);
  4683. // Attempt to match the parameters to a valid binding.
  4684. switch (paramCount)
  4685. {
  4686. case 2:
  4687. {
  4688. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4689. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  4690. {
  4691. // Get parameter 1 off the stack.
  4692. ScriptUtil::LuaArray<ParticleEmitter> param1 = ScriptUtil::getObjectPointer<ParticleEmitter>(2, "ParticleEmitter", false);
  4693. Node* instance = getInstance(state);
  4694. instance->setParticleEmitter(param1);
  4695. return 0;
  4696. }
  4697. else
  4698. {
  4699. lua_pushstring(state, "lua_Node_setParticleEmitter - Failed to match the given parameters to a valid function signature.");
  4700. lua_error(state);
  4701. }
  4702. break;
  4703. }
  4704. default:
  4705. {
  4706. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4707. lua_error(state);
  4708. break;
  4709. }
  4710. }
  4711. return 0;
  4712. }
  4713. int lua_Node_setRotation(lua_State* state)
  4714. {
  4715. // Get the number of parameters.
  4716. int paramCount = lua_gettop(state);
  4717. // Attempt to match the parameters to a valid binding.
  4718. switch (paramCount)
  4719. {
  4720. case 2:
  4721. {
  4722. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4723. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4724. {
  4725. // Get parameter 1 off the stack.
  4726. ScriptUtil::LuaArray<Quaternion> param1 = ScriptUtil::getObjectPointer<Quaternion>(2, "Quaternion", true);
  4727. Node* instance = getInstance(state);
  4728. instance->setRotation(*param1);
  4729. return 0;
  4730. }
  4731. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4732. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4733. {
  4734. // Get parameter 1 off the stack.
  4735. ScriptUtil::LuaArray<Matrix> param1 = ScriptUtil::getObjectPointer<Matrix>(2, "Matrix", true);
  4736. Node* instance = getInstance(state);
  4737. instance->setRotation(*param1);
  4738. return 0;
  4739. }
  4740. else
  4741. {
  4742. lua_pushstring(state, "lua_Node_setRotation - Failed to match the given parameters to a valid function signature.");
  4743. lua_error(state);
  4744. }
  4745. break;
  4746. }
  4747. case 3:
  4748. {
  4749. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4750. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  4751. lua_type(state, 3) == LUA_TNUMBER)
  4752. {
  4753. // Get parameter 1 off the stack.
  4754. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  4755. // Get parameter 2 off the stack.
  4756. float param2 = (float)luaL_checknumber(state, 3);
  4757. Node* instance = getInstance(state);
  4758. instance->setRotation(*param1, param2);
  4759. return 0;
  4760. }
  4761. else
  4762. {
  4763. lua_pushstring(state, "lua_Node_setRotation - Failed to match the given parameters to a valid function signature.");
  4764. lua_error(state);
  4765. }
  4766. break;
  4767. }
  4768. case 5:
  4769. {
  4770. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4771. lua_type(state, 2) == LUA_TNUMBER &&
  4772. lua_type(state, 3) == LUA_TNUMBER &&
  4773. lua_type(state, 4) == LUA_TNUMBER &&
  4774. lua_type(state, 5) == LUA_TNUMBER)
  4775. {
  4776. // Get parameter 1 off the stack.
  4777. float param1 = (float)luaL_checknumber(state, 2);
  4778. // Get parameter 2 off the stack.
  4779. float param2 = (float)luaL_checknumber(state, 3);
  4780. // Get parameter 3 off the stack.
  4781. float param3 = (float)luaL_checknumber(state, 4);
  4782. // Get parameter 4 off the stack.
  4783. float param4 = (float)luaL_checknumber(state, 5);
  4784. Node* instance = getInstance(state);
  4785. instance->setRotation(param1, param2, param3, param4);
  4786. return 0;
  4787. }
  4788. else
  4789. {
  4790. lua_pushstring(state, "lua_Node_setRotation - Failed to match the given parameters to a valid function signature.");
  4791. lua_error(state);
  4792. }
  4793. break;
  4794. }
  4795. default:
  4796. {
  4797. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 5).");
  4798. lua_error(state);
  4799. break;
  4800. }
  4801. }
  4802. return 0;
  4803. }
  4804. int lua_Node_setScale(lua_State* state)
  4805. {
  4806. // Get the number of parameters.
  4807. int paramCount = lua_gettop(state);
  4808. // Attempt to match the parameters to a valid binding.
  4809. switch (paramCount)
  4810. {
  4811. case 2:
  4812. {
  4813. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4814. lua_type(state, 2) == LUA_TNUMBER)
  4815. {
  4816. // Get parameter 1 off the stack.
  4817. float param1 = (float)luaL_checknumber(state, 2);
  4818. Node* instance = getInstance(state);
  4819. instance->setScale(param1);
  4820. return 0;
  4821. }
  4822. else if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4823. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  4824. {
  4825. // Get parameter 1 off the stack.
  4826. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  4827. Node* instance = getInstance(state);
  4828. instance->setScale(*param1);
  4829. return 0;
  4830. }
  4831. else
  4832. {
  4833. lua_pushstring(state, "lua_Node_setScale - Failed to match the given parameters to a valid function signature.");
  4834. lua_error(state);
  4835. }
  4836. break;
  4837. }
  4838. case 4:
  4839. {
  4840. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4841. lua_type(state, 2) == LUA_TNUMBER &&
  4842. lua_type(state, 3) == LUA_TNUMBER &&
  4843. lua_type(state, 4) == LUA_TNUMBER)
  4844. {
  4845. // Get parameter 1 off the stack.
  4846. float param1 = (float)luaL_checknumber(state, 2);
  4847. // Get parameter 2 off the stack.
  4848. float param2 = (float)luaL_checknumber(state, 3);
  4849. // Get parameter 3 off the stack.
  4850. float param3 = (float)luaL_checknumber(state, 4);
  4851. Node* instance = getInstance(state);
  4852. instance->setScale(param1, param2, param3);
  4853. return 0;
  4854. }
  4855. else
  4856. {
  4857. lua_pushstring(state, "lua_Node_setScale - Failed to match the given parameters to a valid function signature.");
  4858. lua_error(state);
  4859. }
  4860. break;
  4861. }
  4862. default:
  4863. {
  4864. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  4865. lua_error(state);
  4866. break;
  4867. }
  4868. }
  4869. return 0;
  4870. }
  4871. int lua_Node_setScaleX(lua_State* state)
  4872. {
  4873. // Get the number of parameters.
  4874. int paramCount = lua_gettop(state);
  4875. // Attempt to match the parameters to a valid binding.
  4876. switch (paramCount)
  4877. {
  4878. case 2:
  4879. {
  4880. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4881. lua_type(state, 2) == LUA_TNUMBER)
  4882. {
  4883. // Get parameter 1 off the stack.
  4884. float param1 = (float)luaL_checknumber(state, 2);
  4885. Node* instance = getInstance(state);
  4886. instance->setScaleX(param1);
  4887. return 0;
  4888. }
  4889. else
  4890. {
  4891. lua_pushstring(state, "lua_Node_setScaleX - Failed to match the given parameters to a valid function signature.");
  4892. lua_error(state);
  4893. }
  4894. break;
  4895. }
  4896. default:
  4897. {
  4898. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4899. lua_error(state);
  4900. break;
  4901. }
  4902. }
  4903. return 0;
  4904. }
  4905. int lua_Node_setScaleY(lua_State* state)
  4906. {
  4907. // Get the number of parameters.
  4908. int paramCount = lua_gettop(state);
  4909. // Attempt to match the parameters to a valid binding.
  4910. switch (paramCount)
  4911. {
  4912. case 2:
  4913. {
  4914. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4915. lua_type(state, 2) == LUA_TNUMBER)
  4916. {
  4917. // Get parameter 1 off the stack.
  4918. float param1 = (float)luaL_checknumber(state, 2);
  4919. Node* instance = getInstance(state);
  4920. instance->setScaleY(param1);
  4921. return 0;
  4922. }
  4923. else
  4924. {
  4925. lua_pushstring(state, "lua_Node_setScaleY - Failed to match the given parameters to a valid function signature.");
  4926. lua_error(state);
  4927. }
  4928. break;
  4929. }
  4930. default:
  4931. {
  4932. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4933. lua_error(state);
  4934. break;
  4935. }
  4936. }
  4937. return 0;
  4938. }
  4939. int lua_Node_setScaleZ(lua_State* state)
  4940. {
  4941. // Get the number of parameters.
  4942. int paramCount = lua_gettop(state);
  4943. // Attempt to match the parameters to a valid binding.
  4944. switch (paramCount)
  4945. {
  4946. case 2:
  4947. {
  4948. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4949. lua_type(state, 2) == LUA_TNUMBER)
  4950. {
  4951. // Get parameter 1 off the stack.
  4952. float param1 = (float)luaL_checknumber(state, 2);
  4953. Node* instance = getInstance(state);
  4954. instance->setScaleZ(param1);
  4955. return 0;
  4956. }
  4957. else
  4958. {
  4959. lua_pushstring(state, "lua_Node_setScaleZ - Failed to match the given parameters to a valid function signature.");
  4960. lua_error(state);
  4961. }
  4962. break;
  4963. }
  4964. default:
  4965. {
  4966. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  4967. lua_error(state);
  4968. break;
  4969. }
  4970. }
  4971. return 0;
  4972. }
  4973. int lua_Node_setTag(lua_State* state)
  4974. {
  4975. // Get the number of parameters.
  4976. int paramCount = lua_gettop(state);
  4977. // Attempt to match the parameters to a valid binding.
  4978. switch (paramCount)
  4979. {
  4980. case 2:
  4981. {
  4982. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  4983. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  4984. {
  4985. // Get parameter 1 off the stack.
  4986. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  4987. Node* instance = getInstance(state);
  4988. instance->setTag(param1);
  4989. return 0;
  4990. }
  4991. else
  4992. {
  4993. lua_pushstring(state, "lua_Node_setTag - Failed to match the given parameters to a valid function signature.");
  4994. lua_error(state);
  4995. }
  4996. break;
  4997. }
  4998. case 3:
  4999. {
  5000. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5001. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
  5002. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  5003. {
  5004. // Get parameter 1 off the stack.
  5005. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(2, false);
  5006. // Get parameter 2 off the stack.
  5007. ScriptUtil::LuaArray<const char> param2 = ScriptUtil::getString(3, false);
  5008. Node* instance = getInstance(state);
  5009. instance->setTag(param1, param2);
  5010. return 0;
  5011. }
  5012. else
  5013. {
  5014. lua_pushstring(state, "lua_Node_setTag - Failed to match the given parameters to a valid function signature.");
  5015. lua_error(state);
  5016. }
  5017. break;
  5018. }
  5019. default:
  5020. {
  5021. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5022. lua_error(state);
  5023. break;
  5024. }
  5025. }
  5026. return 0;
  5027. }
  5028. int lua_Node_setTranslation(lua_State* state)
  5029. {
  5030. // Get the number of parameters.
  5031. int paramCount = lua_gettop(state);
  5032. // Attempt to match the parameters to a valid binding.
  5033. switch (paramCount)
  5034. {
  5035. case 2:
  5036. {
  5037. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5038. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  5039. {
  5040. // Get parameter 1 off the stack.
  5041. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  5042. Node* instance = getInstance(state);
  5043. instance->setTranslation(*param1);
  5044. return 0;
  5045. }
  5046. else
  5047. {
  5048. lua_pushstring(state, "lua_Node_setTranslation - Failed to match the given parameters to a valid function signature.");
  5049. lua_error(state);
  5050. }
  5051. break;
  5052. }
  5053. case 4:
  5054. {
  5055. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5056. lua_type(state, 2) == LUA_TNUMBER &&
  5057. lua_type(state, 3) == LUA_TNUMBER &&
  5058. lua_type(state, 4) == LUA_TNUMBER)
  5059. {
  5060. // Get parameter 1 off the stack.
  5061. float param1 = (float)luaL_checknumber(state, 2);
  5062. // Get parameter 2 off the stack.
  5063. float param2 = (float)luaL_checknumber(state, 3);
  5064. // Get parameter 3 off the stack.
  5065. float param3 = (float)luaL_checknumber(state, 4);
  5066. Node* instance = getInstance(state);
  5067. instance->setTranslation(param1, param2, param3);
  5068. return 0;
  5069. }
  5070. else
  5071. {
  5072. lua_pushstring(state, "lua_Node_setTranslation - Failed to match the given parameters to a valid function signature.");
  5073. lua_error(state);
  5074. }
  5075. break;
  5076. }
  5077. default:
  5078. {
  5079. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  5080. lua_error(state);
  5081. break;
  5082. }
  5083. }
  5084. return 0;
  5085. }
  5086. int lua_Node_setTranslationX(lua_State* state)
  5087. {
  5088. // Get the number of parameters.
  5089. int paramCount = lua_gettop(state);
  5090. // Attempt to match the parameters to a valid binding.
  5091. switch (paramCount)
  5092. {
  5093. case 2:
  5094. {
  5095. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5096. lua_type(state, 2) == LUA_TNUMBER)
  5097. {
  5098. // Get parameter 1 off the stack.
  5099. float param1 = (float)luaL_checknumber(state, 2);
  5100. Node* instance = getInstance(state);
  5101. instance->setTranslationX(param1);
  5102. return 0;
  5103. }
  5104. else
  5105. {
  5106. lua_pushstring(state, "lua_Node_setTranslationX - Failed to match the given parameters to a valid function signature.");
  5107. lua_error(state);
  5108. }
  5109. break;
  5110. }
  5111. default:
  5112. {
  5113. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5114. lua_error(state);
  5115. break;
  5116. }
  5117. }
  5118. return 0;
  5119. }
  5120. int lua_Node_setTranslationY(lua_State* state)
  5121. {
  5122. // Get the number of parameters.
  5123. int paramCount = lua_gettop(state);
  5124. // Attempt to match the parameters to a valid binding.
  5125. switch (paramCount)
  5126. {
  5127. case 2:
  5128. {
  5129. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5130. lua_type(state, 2) == LUA_TNUMBER)
  5131. {
  5132. // Get parameter 1 off the stack.
  5133. float param1 = (float)luaL_checknumber(state, 2);
  5134. Node* instance = getInstance(state);
  5135. instance->setTranslationY(param1);
  5136. return 0;
  5137. }
  5138. else
  5139. {
  5140. lua_pushstring(state, "lua_Node_setTranslationY - Failed to match the given parameters to a valid function signature.");
  5141. lua_error(state);
  5142. }
  5143. break;
  5144. }
  5145. default:
  5146. {
  5147. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5148. lua_error(state);
  5149. break;
  5150. }
  5151. }
  5152. return 0;
  5153. }
  5154. int lua_Node_setTranslationZ(lua_State* state)
  5155. {
  5156. // Get the number of parameters.
  5157. int paramCount = lua_gettop(state);
  5158. // Attempt to match the parameters to a valid binding.
  5159. switch (paramCount)
  5160. {
  5161. case 2:
  5162. {
  5163. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5164. lua_type(state, 2) == LUA_TNUMBER)
  5165. {
  5166. // Get parameter 1 off the stack.
  5167. float param1 = (float)luaL_checknumber(state, 2);
  5168. Node* instance = getInstance(state);
  5169. instance->setTranslationZ(param1);
  5170. return 0;
  5171. }
  5172. else
  5173. {
  5174. lua_pushstring(state, "lua_Node_setTranslationZ - Failed to match the given parameters to a valid function signature.");
  5175. lua_error(state);
  5176. }
  5177. break;
  5178. }
  5179. default:
  5180. {
  5181. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5182. lua_error(state);
  5183. break;
  5184. }
  5185. }
  5186. return 0;
  5187. }
  5188. int lua_Node_static_ANIMATE_ROTATE(lua_State* state)
  5189. {
  5190. // Validate the number of parameters.
  5191. if (lua_gettop(state) > 0)
  5192. {
  5193. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5194. lua_error(state);
  5195. }
  5196. int result = Node::ANIMATE_ROTATE;
  5197. // Push the return value onto the stack.
  5198. lua_pushinteger(state, result);
  5199. return 1;
  5200. }
  5201. int lua_Node_static_ANIMATE_ROTATE_TRANSLATE(lua_State* state)
  5202. {
  5203. // Validate the number of parameters.
  5204. if (lua_gettop(state) > 0)
  5205. {
  5206. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5207. lua_error(state);
  5208. }
  5209. int result = Node::ANIMATE_ROTATE_TRANSLATE;
  5210. // Push the return value onto the stack.
  5211. lua_pushinteger(state, result);
  5212. return 1;
  5213. }
  5214. int lua_Node_static_ANIMATE_SCALE(lua_State* state)
  5215. {
  5216. // Validate the number of parameters.
  5217. if (lua_gettop(state) > 0)
  5218. {
  5219. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5220. lua_error(state);
  5221. }
  5222. int result = Node::ANIMATE_SCALE;
  5223. // Push the return value onto the stack.
  5224. lua_pushinteger(state, result);
  5225. return 1;
  5226. }
  5227. int lua_Node_static_ANIMATE_SCALE_ROTATE(lua_State* state)
  5228. {
  5229. // Validate the number of parameters.
  5230. if (lua_gettop(state) > 0)
  5231. {
  5232. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5233. lua_error(state);
  5234. }
  5235. int result = Node::ANIMATE_SCALE_ROTATE;
  5236. // Push the return value onto the stack.
  5237. lua_pushinteger(state, result);
  5238. return 1;
  5239. }
  5240. int lua_Node_static_ANIMATE_SCALE_ROTATE_TRANSLATE(lua_State* state)
  5241. {
  5242. // Validate the number of parameters.
  5243. if (lua_gettop(state) > 0)
  5244. {
  5245. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5246. lua_error(state);
  5247. }
  5248. int result = Node::ANIMATE_SCALE_ROTATE_TRANSLATE;
  5249. // Push the return value onto the stack.
  5250. lua_pushinteger(state, result);
  5251. return 1;
  5252. }
  5253. int lua_Node_static_ANIMATE_SCALE_TRANSLATE(lua_State* state)
  5254. {
  5255. // Validate the number of parameters.
  5256. if (lua_gettop(state) > 0)
  5257. {
  5258. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5259. lua_error(state);
  5260. }
  5261. int result = Node::ANIMATE_SCALE_TRANSLATE;
  5262. // Push the return value onto the stack.
  5263. lua_pushinteger(state, result);
  5264. return 1;
  5265. }
  5266. int lua_Node_static_ANIMATE_SCALE_UNIT(lua_State* state)
  5267. {
  5268. // Validate the number of parameters.
  5269. if (lua_gettop(state) > 0)
  5270. {
  5271. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5272. lua_error(state);
  5273. }
  5274. int result = Node::ANIMATE_SCALE_UNIT;
  5275. // Push the return value onto the stack.
  5276. lua_pushinteger(state, result);
  5277. return 1;
  5278. }
  5279. int lua_Node_static_ANIMATE_SCALE_X(lua_State* state)
  5280. {
  5281. // Validate the number of parameters.
  5282. if (lua_gettop(state) > 0)
  5283. {
  5284. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5285. lua_error(state);
  5286. }
  5287. int result = Node::ANIMATE_SCALE_X;
  5288. // Push the return value onto the stack.
  5289. lua_pushinteger(state, result);
  5290. return 1;
  5291. }
  5292. int lua_Node_static_ANIMATE_SCALE_Y(lua_State* state)
  5293. {
  5294. // Validate the number of parameters.
  5295. if (lua_gettop(state) > 0)
  5296. {
  5297. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5298. lua_error(state);
  5299. }
  5300. int result = Node::ANIMATE_SCALE_Y;
  5301. // Push the return value onto the stack.
  5302. lua_pushinteger(state, result);
  5303. return 1;
  5304. }
  5305. int lua_Node_static_ANIMATE_SCALE_Z(lua_State* state)
  5306. {
  5307. // Validate the number of parameters.
  5308. if (lua_gettop(state) > 0)
  5309. {
  5310. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5311. lua_error(state);
  5312. }
  5313. int result = Node::ANIMATE_SCALE_Z;
  5314. // Push the return value onto the stack.
  5315. lua_pushinteger(state, result);
  5316. return 1;
  5317. }
  5318. int lua_Node_static_ANIMATE_TRANSLATE(lua_State* state)
  5319. {
  5320. // Validate the number of parameters.
  5321. if (lua_gettop(state) > 0)
  5322. {
  5323. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5324. lua_error(state);
  5325. }
  5326. int result = Node::ANIMATE_TRANSLATE;
  5327. // Push the return value onto the stack.
  5328. lua_pushinteger(state, result);
  5329. return 1;
  5330. }
  5331. int lua_Node_static_ANIMATE_TRANSLATE_X(lua_State* state)
  5332. {
  5333. // Validate the number of parameters.
  5334. if (lua_gettop(state) > 0)
  5335. {
  5336. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5337. lua_error(state);
  5338. }
  5339. int result = Node::ANIMATE_TRANSLATE_X;
  5340. // Push the return value onto the stack.
  5341. lua_pushinteger(state, result);
  5342. return 1;
  5343. }
  5344. int lua_Node_static_ANIMATE_TRANSLATE_Y(lua_State* state)
  5345. {
  5346. // Validate the number of parameters.
  5347. if (lua_gettop(state) > 0)
  5348. {
  5349. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5350. lua_error(state);
  5351. }
  5352. int result = Node::ANIMATE_TRANSLATE_Y;
  5353. // Push the return value onto the stack.
  5354. lua_pushinteger(state, result);
  5355. return 1;
  5356. }
  5357. int lua_Node_static_ANIMATE_TRANSLATE_Z(lua_State* state)
  5358. {
  5359. // Validate the number of parameters.
  5360. if (lua_gettop(state) > 0)
  5361. {
  5362. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5363. lua_error(state);
  5364. }
  5365. int result = Node::ANIMATE_TRANSLATE_Z;
  5366. // Push the return value onto the stack.
  5367. lua_pushinteger(state, result);
  5368. return 1;
  5369. }
  5370. int lua_Node_static_create(lua_State* state)
  5371. {
  5372. // Get the number of parameters.
  5373. int paramCount = lua_gettop(state);
  5374. // Attempt to match the parameters to a valid binding.
  5375. switch (paramCount)
  5376. {
  5377. case 0:
  5378. {
  5379. void* returnPtr = (void*)Node::create();
  5380. if (returnPtr)
  5381. {
  5382. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  5383. object->instance = returnPtr;
  5384. object->owns = true;
  5385. luaL_getmetatable(state, "Node");
  5386. lua_setmetatable(state, -2);
  5387. }
  5388. else
  5389. {
  5390. lua_pushnil(state);
  5391. }
  5392. return 1;
  5393. break;
  5394. }
  5395. case 1:
  5396. {
  5397. if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
  5398. {
  5399. // Get parameter 1 off the stack.
  5400. ScriptUtil::LuaArray<const char> param1 = ScriptUtil::getString(1, false);
  5401. void* returnPtr = (void*)Node::create(param1);
  5402. if (returnPtr)
  5403. {
  5404. ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
  5405. object->instance = returnPtr;
  5406. object->owns = true;
  5407. luaL_getmetatable(state, "Node");
  5408. lua_setmetatable(state, -2);
  5409. }
  5410. else
  5411. {
  5412. lua_pushnil(state);
  5413. }
  5414. return 1;
  5415. }
  5416. else
  5417. {
  5418. lua_pushstring(state, "lua_Node_static_create - Failed to match the given parameters to a valid function signature.");
  5419. lua_error(state);
  5420. }
  5421. break;
  5422. }
  5423. default:
  5424. {
  5425. lua_pushstring(state, "Invalid number of parameters (expected 0 or 1).");
  5426. lua_error(state);
  5427. break;
  5428. }
  5429. }
  5430. return 0;
  5431. }
  5432. int lua_Node_static_isTransformChangedSuspended(lua_State* state)
  5433. {
  5434. // Get the number of parameters.
  5435. int paramCount = lua_gettop(state);
  5436. // Attempt to match the parameters to a valid binding.
  5437. switch (paramCount)
  5438. {
  5439. case 0:
  5440. {
  5441. bool result = Node::isTransformChangedSuspended();
  5442. // Push the return value onto the stack.
  5443. lua_pushboolean(state, result);
  5444. return 1;
  5445. break;
  5446. }
  5447. default:
  5448. {
  5449. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5450. lua_error(state);
  5451. break;
  5452. }
  5453. }
  5454. return 0;
  5455. }
  5456. int lua_Node_static_resumeTransformChanged(lua_State* state)
  5457. {
  5458. // Get the number of parameters.
  5459. int paramCount = lua_gettop(state);
  5460. // Attempt to match the parameters to a valid binding.
  5461. switch (paramCount)
  5462. {
  5463. case 0:
  5464. {
  5465. Node::resumeTransformChanged();
  5466. return 0;
  5467. break;
  5468. }
  5469. default:
  5470. {
  5471. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5472. lua_error(state);
  5473. break;
  5474. }
  5475. }
  5476. return 0;
  5477. }
  5478. int lua_Node_static_suspendTransformChanged(lua_State* state)
  5479. {
  5480. // Get the number of parameters.
  5481. int paramCount = lua_gettop(state);
  5482. // Attempt to match the parameters to a valid binding.
  5483. switch (paramCount)
  5484. {
  5485. case 0:
  5486. {
  5487. Node::suspendTransformChanged();
  5488. return 0;
  5489. break;
  5490. }
  5491. default:
  5492. {
  5493. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  5494. lua_error(state);
  5495. break;
  5496. }
  5497. }
  5498. return 0;
  5499. }
  5500. int lua_Node_transformPoint(lua_State* state)
  5501. {
  5502. // Get the number of parameters.
  5503. int paramCount = lua_gettop(state);
  5504. // Attempt to match the parameters to a valid binding.
  5505. switch (paramCount)
  5506. {
  5507. case 2:
  5508. {
  5509. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5510. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  5511. {
  5512. // Get parameter 1 off the stack.
  5513. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  5514. Node* instance = getInstance(state);
  5515. instance->transformPoint(param1);
  5516. return 0;
  5517. }
  5518. else
  5519. {
  5520. lua_pushstring(state, "lua_Node_transformPoint - Failed to match the given parameters to a valid function signature.");
  5521. lua_error(state);
  5522. }
  5523. break;
  5524. }
  5525. case 3:
  5526. {
  5527. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5528. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  5529. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  5530. {
  5531. // Get parameter 1 off the stack.
  5532. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  5533. // Get parameter 2 off the stack.
  5534. ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", false);
  5535. Node* instance = getInstance(state);
  5536. instance->transformPoint(*param1, param2);
  5537. return 0;
  5538. }
  5539. else
  5540. {
  5541. lua_pushstring(state, "lua_Node_transformPoint - Failed to match the given parameters to a valid function signature.");
  5542. lua_error(state);
  5543. }
  5544. break;
  5545. }
  5546. default:
  5547. {
  5548. lua_pushstring(state, "Invalid number of parameters (expected 2 or 3).");
  5549. lua_error(state);
  5550. break;
  5551. }
  5552. }
  5553. return 0;
  5554. }
  5555. int lua_Node_transformVector(lua_State* state)
  5556. {
  5557. // Get the number of parameters.
  5558. int paramCount = lua_gettop(state);
  5559. // Attempt to match the parameters to a valid binding.
  5560. switch (paramCount)
  5561. {
  5562. case 2:
  5563. {
  5564. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5565. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  5566. {
  5567. // Get parameter 1 off the stack.
  5568. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", false);
  5569. Node* instance = getInstance(state);
  5570. instance->transformVector(param1);
  5571. return 0;
  5572. }
  5573. else
  5574. {
  5575. lua_pushstring(state, "lua_Node_transformVector - Failed to match the given parameters to a valid function signature.");
  5576. lua_error(state);
  5577. }
  5578. break;
  5579. }
  5580. case 3:
  5581. {
  5582. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5583. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  5584. (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL))
  5585. {
  5586. // Get parameter 1 off the stack.
  5587. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  5588. // Get parameter 2 off the stack.
  5589. ScriptUtil::LuaArray<Vector3> param2 = ScriptUtil::getObjectPointer<Vector3>(3, "Vector3", false);
  5590. Node* instance = getInstance(state);
  5591. instance->transformVector(*param1, param2);
  5592. return 0;
  5593. }
  5594. else
  5595. {
  5596. lua_pushstring(state, "lua_Node_transformVector - Failed to match the given parameters to a valid function signature.");
  5597. lua_error(state);
  5598. }
  5599. break;
  5600. }
  5601. case 6:
  5602. {
  5603. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5604. lua_type(state, 2) == LUA_TNUMBER &&
  5605. lua_type(state, 3) == LUA_TNUMBER &&
  5606. lua_type(state, 4) == LUA_TNUMBER &&
  5607. lua_type(state, 5) == LUA_TNUMBER &&
  5608. (lua_type(state, 6) == LUA_TUSERDATA || lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TNIL))
  5609. {
  5610. // Get parameter 1 off the stack.
  5611. float param1 = (float)luaL_checknumber(state, 2);
  5612. // Get parameter 2 off the stack.
  5613. float param2 = (float)luaL_checknumber(state, 3);
  5614. // Get parameter 3 off the stack.
  5615. float param3 = (float)luaL_checknumber(state, 4);
  5616. // Get parameter 4 off the stack.
  5617. float param4 = (float)luaL_checknumber(state, 5);
  5618. // Get parameter 5 off the stack.
  5619. ScriptUtil::LuaArray<Vector3> param5 = ScriptUtil::getObjectPointer<Vector3>(6, "Vector3", false);
  5620. Node* instance = getInstance(state);
  5621. instance->transformVector(param1, param2, param3, param4, param5);
  5622. return 0;
  5623. }
  5624. else
  5625. {
  5626. lua_pushstring(state, "lua_Node_transformVector - Failed to match the given parameters to a valid function signature.");
  5627. lua_error(state);
  5628. }
  5629. break;
  5630. }
  5631. default:
  5632. {
  5633. lua_pushstring(state, "Invalid number of parameters (expected 2, 3 or 6).");
  5634. lua_error(state);
  5635. break;
  5636. }
  5637. }
  5638. return 0;
  5639. }
  5640. int lua_Node_translate(lua_State* state)
  5641. {
  5642. // Get the number of parameters.
  5643. int paramCount = lua_gettop(state);
  5644. // Attempt to match the parameters to a valid binding.
  5645. switch (paramCount)
  5646. {
  5647. case 2:
  5648. {
  5649. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5650. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
  5651. {
  5652. // Get parameter 1 off the stack.
  5653. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  5654. Node* instance = getInstance(state);
  5655. instance->translate(*param1);
  5656. return 0;
  5657. }
  5658. else
  5659. {
  5660. lua_pushstring(state, "lua_Node_translate - Failed to match the given parameters to a valid function signature.");
  5661. lua_error(state);
  5662. }
  5663. break;
  5664. }
  5665. case 4:
  5666. {
  5667. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5668. lua_type(state, 2) == LUA_TNUMBER &&
  5669. lua_type(state, 3) == LUA_TNUMBER &&
  5670. lua_type(state, 4) == LUA_TNUMBER)
  5671. {
  5672. // Get parameter 1 off the stack.
  5673. float param1 = (float)luaL_checknumber(state, 2);
  5674. // Get parameter 2 off the stack.
  5675. float param2 = (float)luaL_checknumber(state, 3);
  5676. // Get parameter 3 off the stack.
  5677. float param3 = (float)luaL_checknumber(state, 4);
  5678. Node* instance = getInstance(state);
  5679. instance->translate(param1, param2, param3);
  5680. return 0;
  5681. }
  5682. else
  5683. {
  5684. lua_pushstring(state, "lua_Node_translate - Failed to match the given parameters to a valid function signature.");
  5685. lua_error(state);
  5686. }
  5687. break;
  5688. }
  5689. default:
  5690. {
  5691. lua_pushstring(state, "Invalid number of parameters (expected 2 or 4).");
  5692. lua_error(state);
  5693. break;
  5694. }
  5695. }
  5696. return 0;
  5697. }
  5698. int lua_Node_translateForward(lua_State* state)
  5699. {
  5700. // Get the number of parameters.
  5701. int paramCount = lua_gettop(state);
  5702. // Attempt to match the parameters to a valid binding.
  5703. switch (paramCount)
  5704. {
  5705. case 2:
  5706. {
  5707. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5708. lua_type(state, 2) == LUA_TNUMBER)
  5709. {
  5710. // Get parameter 1 off the stack.
  5711. float param1 = (float)luaL_checknumber(state, 2);
  5712. Node* instance = getInstance(state);
  5713. instance->translateForward(param1);
  5714. return 0;
  5715. }
  5716. else
  5717. {
  5718. lua_pushstring(state, "lua_Node_translateForward - Failed to match the given parameters to a valid function signature.");
  5719. lua_error(state);
  5720. }
  5721. break;
  5722. }
  5723. default:
  5724. {
  5725. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5726. lua_error(state);
  5727. break;
  5728. }
  5729. }
  5730. return 0;
  5731. }
  5732. int lua_Node_translateLeft(lua_State* state)
  5733. {
  5734. // Get the number of parameters.
  5735. int paramCount = lua_gettop(state);
  5736. // Attempt to match the parameters to a valid binding.
  5737. switch (paramCount)
  5738. {
  5739. case 2:
  5740. {
  5741. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5742. lua_type(state, 2) == LUA_TNUMBER)
  5743. {
  5744. // Get parameter 1 off the stack.
  5745. float param1 = (float)luaL_checknumber(state, 2);
  5746. Node* instance = getInstance(state);
  5747. instance->translateLeft(param1);
  5748. return 0;
  5749. }
  5750. else
  5751. {
  5752. lua_pushstring(state, "lua_Node_translateLeft - Failed to match the given parameters to a valid function signature.");
  5753. lua_error(state);
  5754. }
  5755. break;
  5756. }
  5757. default:
  5758. {
  5759. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5760. lua_error(state);
  5761. break;
  5762. }
  5763. }
  5764. return 0;
  5765. }
  5766. int lua_Node_translateSmooth(lua_State* state)
  5767. {
  5768. // Get the number of parameters.
  5769. int paramCount = lua_gettop(state);
  5770. // Attempt to match the parameters to a valid binding.
  5771. switch (paramCount)
  5772. {
  5773. case 4:
  5774. {
  5775. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5776. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) &&
  5777. lua_type(state, 3) == LUA_TNUMBER &&
  5778. lua_type(state, 4) == LUA_TNUMBER)
  5779. {
  5780. // Get parameter 1 off the stack.
  5781. ScriptUtil::LuaArray<Vector3> param1 = ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true);
  5782. // Get parameter 2 off the stack.
  5783. float param2 = (float)luaL_checknumber(state, 3);
  5784. // Get parameter 3 off the stack.
  5785. float param3 = (float)luaL_checknumber(state, 4);
  5786. Node* instance = getInstance(state);
  5787. instance->translateSmooth(*param1, param2, param3);
  5788. return 0;
  5789. }
  5790. else
  5791. {
  5792. lua_pushstring(state, "lua_Node_translateSmooth - Failed to match the given parameters to a valid function signature.");
  5793. lua_error(state);
  5794. }
  5795. break;
  5796. }
  5797. default:
  5798. {
  5799. lua_pushstring(state, "Invalid number of parameters (expected 4).");
  5800. lua_error(state);
  5801. break;
  5802. }
  5803. }
  5804. return 0;
  5805. }
  5806. int lua_Node_translateUp(lua_State* state)
  5807. {
  5808. // Get the number of parameters.
  5809. int paramCount = lua_gettop(state);
  5810. // Attempt to match the parameters to a valid binding.
  5811. switch (paramCount)
  5812. {
  5813. case 2:
  5814. {
  5815. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5816. lua_type(state, 2) == LUA_TNUMBER)
  5817. {
  5818. // Get parameter 1 off the stack.
  5819. float param1 = (float)luaL_checknumber(state, 2);
  5820. Node* instance = getInstance(state);
  5821. instance->translateUp(param1);
  5822. return 0;
  5823. }
  5824. else
  5825. {
  5826. lua_pushstring(state, "lua_Node_translateUp - Failed to match the given parameters to a valid function signature.");
  5827. lua_error(state);
  5828. }
  5829. break;
  5830. }
  5831. default:
  5832. {
  5833. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5834. lua_error(state);
  5835. break;
  5836. }
  5837. }
  5838. return 0;
  5839. }
  5840. int lua_Node_translateX(lua_State* state)
  5841. {
  5842. // Get the number of parameters.
  5843. int paramCount = lua_gettop(state);
  5844. // Attempt to match the parameters to a valid binding.
  5845. switch (paramCount)
  5846. {
  5847. case 2:
  5848. {
  5849. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5850. lua_type(state, 2) == LUA_TNUMBER)
  5851. {
  5852. // Get parameter 1 off the stack.
  5853. float param1 = (float)luaL_checknumber(state, 2);
  5854. Node* instance = getInstance(state);
  5855. instance->translateX(param1);
  5856. return 0;
  5857. }
  5858. else
  5859. {
  5860. lua_pushstring(state, "lua_Node_translateX - Failed to match the given parameters to a valid function signature.");
  5861. lua_error(state);
  5862. }
  5863. break;
  5864. }
  5865. default:
  5866. {
  5867. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5868. lua_error(state);
  5869. break;
  5870. }
  5871. }
  5872. return 0;
  5873. }
  5874. int lua_Node_translateY(lua_State* state)
  5875. {
  5876. // Get the number of parameters.
  5877. int paramCount = lua_gettop(state);
  5878. // Attempt to match the parameters to a valid binding.
  5879. switch (paramCount)
  5880. {
  5881. case 2:
  5882. {
  5883. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5884. lua_type(state, 2) == LUA_TNUMBER)
  5885. {
  5886. // Get parameter 1 off the stack.
  5887. float param1 = (float)luaL_checknumber(state, 2);
  5888. Node* instance = getInstance(state);
  5889. instance->translateY(param1);
  5890. return 0;
  5891. }
  5892. else
  5893. {
  5894. lua_pushstring(state, "lua_Node_translateY - Failed to match the given parameters to a valid function signature.");
  5895. lua_error(state);
  5896. }
  5897. break;
  5898. }
  5899. default:
  5900. {
  5901. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5902. lua_error(state);
  5903. break;
  5904. }
  5905. }
  5906. return 0;
  5907. }
  5908. int lua_Node_translateZ(lua_State* state)
  5909. {
  5910. // Get the number of parameters.
  5911. int paramCount = lua_gettop(state);
  5912. // Attempt to match the parameters to a valid binding.
  5913. switch (paramCount)
  5914. {
  5915. case 2:
  5916. {
  5917. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  5918. lua_type(state, 2) == LUA_TNUMBER)
  5919. {
  5920. // Get parameter 1 off the stack.
  5921. float param1 = (float)luaL_checknumber(state, 2);
  5922. Node* instance = getInstance(state);
  5923. instance->translateZ(param1);
  5924. return 0;
  5925. }
  5926. else
  5927. {
  5928. lua_pushstring(state, "lua_Node_translateZ - Failed to match the given parameters to a valid function signature.");
  5929. lua_error(state);
  5930. }
  5931. break;
  5932. }
  5933. default:
  5934. {
  5935. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  5936. lua_error(state);
  5937. break;
  5938. }
  5939. }
  5940. return 0;
  5941. }
  5942. }