lua_Joint.cpp 210 KB

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