lua_Joint.cpp 205 KB

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