lua_Node.cpp 210 KB

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