lua_Node.cpp 237 KB

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