lua_Joint.cpp 229 KB

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