lua_Joint.cpp 209 KB

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