lua_Node.cpp 207 KB

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