lua_Node.cpp 205 KB

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