lua_Node.cpp 213 KB

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