lua_Joint.cpp 207 KB

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