lua_Node.cpp 230 KB

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