| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618 |
- // Copyright (C) 2014, Panagiotis Christopoulos Charitos.
- // All rights reserved.
- // Code licensed under the BSD License.
- // http://www.anki3d.org/LICENSE
- // WARNING: The file is auto generated.
- #include "anki/script/LuaBinder.h"
- #include "anki/script/ScriptManager.h"
- #include "anki/Scene.h"
- namespace anki {
- //==============================================================================
- template<typename T, typename... TArgs>
- static T* newSceneNode(SceneGraph* scene, CString name, TArgs... args)
- {
- T* ptr;
- Error err = scene->template newSceneNode<T>(
- name, ptr, args...);
- if(!err)
- {
- return ptr;
- }
- else
- {
- return nullptr;
- }
- }
- //==============================================================================
- static SceneGraph* getSceneGraph(lua_State* l)
- {
- LuaBinder* binder = reinterpret_cast<LuaBinder*>(lua_getuserdata(l));
- ScriptManager* scriptManager =
- reinterpret_cast<ScriptManager*>(binder->getParent());
- return &scriptManager->_getSceneGraph();
- }
- //==============================================================================
- // MoveComponent =
- //==============================================================================
- //==============================================================================
- static const char* classnameMoveComponent = "MoveComponent";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<MoveComponent>()
- {
- return 2038493110845313445;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<MoveComponent>()
- {
- return classnameMoveComponent;
- }
- //==============================================================================
- /// Pre-wrap method MoveComponent::setLocalOrigin.
- static inline int pwrapMoveComponentsetLocalOrigin(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameMoveComponent, 2038493110845313445, ud)) return -1;
- MoveComponent* self = static_cast<MoveComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- if(LuaBinder::checkUserData(l, 2, "Vec4", 6804478823655046386, ud)) return -1;
- Vec4* iarg0 = static_cast<Vec4*>(ud->m_data);
- const Vec4& arg0(*iarg0);
-
- // Call the method
- self->setLocalOrigin(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method MoveComponent::setLocalOrigin.
- static int wrapMoveComponentsetLocalOrigin(lua_State* l)
- {
- int res = pwrapMoveComponentsetLocalOrigin(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method MoveComponent::getLocalOrigin.
- static inline int pwrapMoveComponentgetLocalOrigin(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameMoveComponent, 2038493110845313445, ud)) return -1;
- MoveComponent* self = static_cast<MoveComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- const Vec4& ret = self->getLocalOrigin();
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "Vec4");
- ud->m_data = const_cast<void*>(static_cast<const void*>(&ret));
- ud->m_gc = false;
- ud->m_sig = 6804478823655046386;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method MoveComponent::getLocalOrigin.
- static int wrapMoveComponentgetLocalOrigin(lua_State* l)
- {
- int res = pwrapMoveComponentgetLocalOrigin(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method MoveComponent::setLocalRotation.
- static inline int pwrapMoveComponentsetLocalRotation(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameMoveComponent, 2038493110845313445, ud)) return -1;
- MoveComponent* self = static_cast<MoveComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- if(LuaBinder::checkUserData(l, 2, "Mat3x4", -2654194732934255869, ud)) return -1;
- Mat3x4* iarg0 = static_cast<Mat3x4*>(ud->m_data);
- const Mat3x4& arg0(*iarg0);
-
- // Call the method
- self->setLocalRotation(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method MoveComponent::setLocalRotation.
- static int wrapMoveComponentsetLocalRotation(lua_State* l)
- {
- int res = pwrapMoveComponentsetLocalRotation(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method MoveComponent::getLocalRotation.
- static inline int pwrapMoveComponentgetLocalRotation(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameMoveComponent, 2038493110845313445, ud)) return -1;
- MoveComponent* self = static_cast<MoveComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- const Mat3x4& ret = self->getLocalRotation();
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "Mat3x4");
- ud->m_data = const_cast<void*>(static_cast<const void*>(&ret));
- ud->m_gc = false;
- ud->m_sig = -2654194732934255869;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method MoveComponent::getLocalRotation.
- static int wrapMoveComponentgetLocalRotation(lua_State* l)
- {
- int res = pwrapMoveComponentgetLocalRotation(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method MoveComponent::setLocalScale.
- static inline int pwrapMoveComponentsetLocalScale(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameMoveComponent, 2038493110845313445, ud)) return -1;
- MoveComponent* self = static_cast<MoveComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- F32 arg0;
- if(LuaBinder::checkNumber(l, 2, arg0)) return -1;
-
- // Call the method
- self->setLocalScale(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method MoveComponent::setLocalScale.
- static int wrapMoveComponentsetLocalScale(lua_State* l)
- {
- int res = pwrapMoveComponentsetLocalScale(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method MoveComponent::getLocalScale.
- static inline int pwrapMoveComponentgetLocalScale(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameMoveComponent, 2038493110845313445, ud)) return -1;
- MoveComponent* self = static_cast<MoveComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- F32 ret = self->getLocalScale();
-
- // Push return value
- lua_pushnumber(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method MoveComponent::getLocalScale.
- static int wrapMoveComponentgetLocalScale(lua_State* l)
- {
- int res = pwrapMoveComponentgetLocalScale(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class MoveComponent.
- static inline void wrapMoveComponent(lua_State* l)
- {
- LuaBinder::createClass(l, classnameMoveComponent);
- LuaBinder::pushLuaCFuncMethod(l, "setLocalOrigin", wrapMoveComponentsetLocalOrigin);
- LuaBinder::pushLuaCFuncMethod(l, "getLocalOrigin", wrapMoveComponentgetLocalOrigin);
- LuaBinder::pushLuaCFuncMethod(l, "setLocalRotation", wrapMoveComponentsetLocalRotation);
- LuaBinder::pushLuaCFuncMethod(l, "getLocalRotation", wrapMoveComponentgetLocalRotation);
- LuaBinder::pushLuaCFuncMethod(l, "setLocalScale", wrapMoveComponentsetLocalScale);
- LuaBinder::pushLuaCFuncMethod(l, "getLocalScale", wrapMoveComponentgetLocalScale);
- lua_settop(l, 0);
- }
- //==============================================================================
- // LightComponent =
- //==============================================================================
- //==============================================================================
- static const char* classnameLightComponent = "LightComponent";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<LightComponent>()
- {
- return 7940823622056993903;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<LightComponent>()
- {
- return classnameLightComponent;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setDiffuseColor.
- static inline int pwrapLightComponentsetDiffuseColor(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- if(LuaBinder::checkUserData(l, 2, "Vec4", 6804478823655046386, ud)) return -1;
- Vec4* iarg0 = static_cast<Vec4*>(ud->m_data);
- const Vec4& arg0(*iarg0);
-
- // Call the method
- self->setDiffuseColor(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setDiffuseColor.
- static int wrapLightComponentsetDiffuseColor(lua_State* l)
- {
- int res = pwrapLightComponentsetDiffuseColor(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getDiffuseColor.
- static inline int pwrapLightComponentgetDiffuseColor(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- const Vec4& ret = self->getDiffuseColor();
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "Vec4");
- ud->m_data = const_cast<void*>(static_cast<const void*>(&ret));
- ud->m_gc = false;
- ud->m_sig = 6804478823655046386;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getDiffuseColor.
- static int wrapLightComponentgetDiffuseColor(lua_State* l)
- {
- int res = pwrapLightComponentgetDiffuseColor(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setSpecularColor.
- static inline int pwrapLightComponentsetSpecularColor(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- if(LuaBinder::checkUserData(l, 2, "Vec4", 6804478823655046386, ud)) return -1;
- Vec4* iarg0 = static_cast<Vec4*>(ud->m_data);
- const Vec4& arg0(*iarg0);
-
- // Call the method
- self->setSpecularColor(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setSpecularColor.
- static int wrapLightComponentsetSpecularColor(lua_State* l)
- {
- int res = pwrapLightComponentsetSpecularColor(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getSpecularColor.
- static inline int pwrapLightComponentgetSpecularColor(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- const Vec4& ret = self->getSpecularColor();
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "Vec4");
- ud->m_data = const_cast<void*>(static_cast<const void*>(&ret));
- ud->m_gc = false;
- ud->m_sig = 6804478823655046386;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getSpecularColor.
- static int wrapLightComponentgetSpecularColor(lua_State* l)
- {
- int res = pwrapLightComponentgetSpecularColor(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setRadius.
- static inline int pwrapLightComponentsetRadius(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- F32 arg0;
- if(LuaBinder::checkNumber(l, 2, arg0)) return -1;
-
- // Call the method
- self->setRadius(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setRadius.
- static int wrapLightComponentsetRadius(lua_State* l)
- {
- int res = pwrapLightComponentsetRadius(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getRadius.
- static inline int pwrapLightComponentgetRadius(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- F32 ret = self->getRadius();
-
- // Push return value
- lua_pushnumber(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getRadius.
- static int wrapLightComponentgetRadius(lua_State* l)
- {
- int res = pwrapLightComponentgetRadius(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setDistance.
- static inline int pwrapLightComponentsetDistance(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- F32 arg0;
- if(LuaBinder::checkNumber(l, 2, arg0)) return -1;
-
- // Call the method
- self->setDistance(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setDistance.
- static int wrapLightComponentsetDistance(lua_State* l)
- {
- int res = pwrapLightComponentsetDistance(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getDistance.
- static inline int pwrapLightComponentgetDistance(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- F32 ret = self->getDistance();
-
- // Push return value
- lua_pushnumber(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getDistance.
- static int wrapLightComponentgetDistance(lua_State* l)
- {
- int res = pwrapLightComponentgetDistance(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setInnerAngle.
- static inline int pwrapLightComponentsetInnerAngle(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- F32 arg0;
- if(LuaBinder::checkNumber(l, 2, arg0)) return -1;
-
- // Call the method
- self->setInnerAngle(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setInnerAngle.
- static int wrapLightComponentsetInnerAngle(lua_State* l)
- {
- int res = pwrapLightComponentsetInnerAngle(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getInnerAngle.
- static inline int pwrapLightComponentgetInnerAngle(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- F32 ret = self->getInnerAngle();
-
- // Push return value
- lua_pushnumber(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getInnerAngle.
- static int wrapLightComponentgetInnerAngle(lua_State* l)
- {
- int res = pwrapLightComponentgetInnerAngle(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setOuterAngle.
- static inline int pwrapLightComponentsetOuterAngle(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- F32 arg0;
- if(LuaBinder::checkNumber(l, 2, arg0)) return -1;
-
- // Call the method
- self->setOuterAngle(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setOuterAngle.
- static int wrapLightComponentsetOuterAngle(lua_State* l)
- {
- int res = pwrapLightComponentsetOuterAngle(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getOuterAngle.
- static inline int pwrapLightComponentgetOuterAngle(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- F32 ret = self->getOuterAngle();
-
- // Push return value
- lua_pushnumber(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getOuterAngle.
- static int wrapLightComponentgetOuterAngle(lua_State* l)
- {
- int res = pwrapLightComponentgetOuterAngle(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::setShadowEnabled.
- static inline int pwrapLightComponentsetShadowEnabled(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- Bool arg0;
- if(LuaBinder::checkNumber(l, 2, arg0)) return -1;
-
- // Call the method
- self->setShadowEnabled(arg0);
-
- return 0;
- }
- //==============================================================================
- /// Wrap method LightComponent::setShadowEnabled.
- static int wrapLightComponentsetShadowEnabled(lua_State* l)
- {
- int res = pwrapLightComponentsetShadowEnabled(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method LightComponent::getShadowEnabled.
- static inline int pwrapLightComponentgetShadowEnabled(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameLightComponent, 7940823622056993903, ud)) return -1;
- LightComponent* self = static_cast<LightComponent*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- Bool ret = self->getShadowEnabled();
-
- // Push return value
- lua_pushboolean(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method LightComponent::getShadowEnabled.
- static int wrapLightComponentgetShadowEnabled(lua_State* l)
- {
- int res = pwrapLightComponentgetShadowEnabled(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class LightComponent.
- static inline void wrapLightComponent(lua_State* l)
- {
- LuaBinder::createClass(l, classnameLightComponent);
- LuaBinder::pushLuaCFuncMethod(l, "setDiffuseColor", wrapLightComponentsetDiffuseColor);
- LuaBinder::pushLuaCFuncMethod(l, "getDiffuseColor", wrapLightComponentgetDiffuseColor);
- LuaBinder::pushLuaCFuncMethod(l, "setSpecularColor", wrapLightComponentsetSpecularColor);
- LuaBinder::pushLuaCFuncMethod(l, "getSpecularColor", wrapLightComponentgetSpecularColor);
- LuaBinder::pushLuaCFuncMethod(l, "setRadius", wrapLightComponentsetRadius);
- LuaBinder::pushLuaCFuncMethod(l, "getRadius", wrapLightComponentgetRadius);
- LuaBinder::pushLuaCFuncMethod(l, "setDistance", wrapLightComponentsetDistance);
- LuaBinder::pushLuaCFuncMethod(l, "getDistance", wrapLightComponentgetDistance);
- LuaBinder::pushLuaCFuncMethod(l, "setInnerAngle", wrapLightComponentsetInnerAngle);
- LuaBinder::pushLuaCFuncMethod(l, "getInnerAngle", wrapLightComponentgetInnerAngle);
- LuaBinder::pushLuaCFuncMethod(l, "setOuterAngle", wrapLightComponentsetOuterAngle);
- LuaBinder::pushLuaCFuncMethod(l, "getOuterAngle", wrapLightComponentgetOuterAngle);
- LuaBinder::pushLuaCFuncMethod(l, "setShadowEnabled", wrapLightComponentsetShadowEnabled);
- LuaBinder::pushLuaCFuncMethod(l, "getShadowEnabled", wrapLightComponentgetShadowEnabled);
- lua_settop(l, 0);
- }
- //==============================================================================
- // SceneNode =
- //==============================================================================
- //==============================================================================
- static const char* classnameSceneNode = "SceneNode";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<SceneNode>()
- {
- return -2220074417980276571;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<SceneNode>()
- {
- return classnameSceneNode;
- }
- //==============================================================================
- /// Pre-wrap method SceneNode::getName.
- static inline int pwrapSceneNodegetName(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneNode, -2220074417980276571, ud)) return -1;
- SceneNode* self = static_cast<SceneNode*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- CString ret = self->getName();
-
- // Push return value
- lua_pushstring(l, &ret[0]);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneNode::getName.
- static int wrapSceneNodegetName(lua_State* l)
- {
- int res = pwrapSceneNodegetName(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method SceneNode::addChild.
- static inline int pwrapSceneNodeaddChild(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneNode, -2220074417980276571, ud)) return -1;
- SceneNode* self = static_cast<SceneNode*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- if(LuaBinder::checkUserData(l, 2, "SceneNode", -2220074417980276571, ud)) return -1;
- SceneNode* iarg0 = static_cast<SceneNode*>(ud->m_data);
- SceneNode* arg0(iarg0);
-
- // Call the method
- Error ret = self->addChild(arg0);
-
- // Push return value
- if(ANKI_UNLIKELY(ret))
- {
- lua_pushstring(l, "Glue code returned an error");
- return -1;
- }
-
- lua_pushnumber(l, ret);
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneNode::addChild.
- static int wrapSceneNodeaddChild(lua_State* l)
- {
- int res = pwrapSceneNodeaddChild(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method SceneNode::tryGetComponent<MoveComponent>.
- static inline int pwrapSceneNodegetMoveComponent(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneNode, -2220074417980276571, ud)) return -1;
- SceneNode* self = static_cast<SceneNode*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- MoveComponent* ret = self->tryGetComponent<MoveComponent>();
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "MoveComponent");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = 2038493110845313445;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneNode::tryGetComponent<MoveComponent>.
- static int wrapSceneNodegetMoveComponent(lua_State* l)
- {
- int res = pwrapSceneNodegetMoveComponent(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method SceneNode::tryGetComponent<LightComponent>.
- static inline int pwrapSceneNodegetLightComponent(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneNode, -2220074417980276571, ud)) return -1;
- SceneNode* self = static_cast<SceneNode*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- LightComponent* ret = self->tryGetComponent<LightComponent>();
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "LightComponent");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = 7940823622056993903;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneNode::tryGetComponent<LightComponent>.
- static int wrapSceneNodegetLightComponent(lua_State* l)
- {
- int res = pwrapSceneNodegetLightComponent(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class SceneNode.
- static inline void wrapSceneNode(lua_State* l)
- {
- LuaBinder::createClass(l, classnameSceneNode);
- LuaBinder::pushLuaCFuncMethod(l, "getName", wrapSceneNodegetName);
- LuaBinder::pushLuaCFuncMethod(l, "addChild", wrapSceneNodeaddChild);
- LuaBinder::pushLuaCFuncMethod(l, "getMoveComponent", wrapSceneNodegetMoveComponent);
- LuaBinder::pushLuaCFuncMethod(l, "getLightComponent", wrapSceneNodegetLightComponent);
- lua_settop(l, 0);
- }
- //==============================================================================
- // ModelNode =
- //==============================================================================
- //==============================================================================
- static const char* classnameModelNode = "ModelNode";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<ModelNode>()
- {
- return -1856316251880904290;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<ModelNode>()
- {
- return classnameModelNode;
- }
- //==============================================================================
- /// Pre-wrap method ModelNode::getSceneNodeBase.
- static inline int pwrapModelNodegetSceneNodeBase(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameModelNode, -1856316251880904290, ud)) return -1;
- ModelNode* self = static_cast<ModelNode*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- SceneNode& ret = *self;
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "SceneNode");
- ud->m_data = static_cast<void*>(&ret);
- ud->m_gc = false;
- ud->m_sig = -2220074417980276571;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method ModelNode::getSceneNodeBase.
- static int wrapModelNodegetSceneNodeBase(lua_State* l)
- {
- int res = pwrapModelNodegetSceneNodeBase(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class ModelNode.
- static inline void wrapModelNode(lua_State* l)
- {
- LuaBinder::createClass(l, classnameModelNode);
- LuaBinder::pushLuaCFuncMethod(l, "getSceneNodeBase", wrapModelNodegetSceneNodeBase);
- lua_settop(l, 0);
- }
- //==============================================================================
- // InstanceNode =
- //==============================================================================
- //==============================================================================
- static const char* classnameInstanceNode = "InstanceNode";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<InstanceNode>()
- {
- return -2063375830923741403;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<InstanceNode>()
- {
- return classnameInstanceNode;
- }
- //==============================================================================
- /// Pre-wrap method InstanceNode::getSceneNodeBase.
- static inline int pwrapInstanceNodegetSceneNodeBase(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameInstanceNode, -2063375830923741403, ud)) return -1;
- InstanceNode* self = static_cast<InstanceNode*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- SceneNode& ret = *self;
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "SceneNode");
- ud->m_data = static_cast<void*>(&ret);
- ud->m_gc = false;
- ud->m_sig = -2220074417980276571;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method InstanceNode::getSceneNodeBase.
- static int wrapInstanceNodegetSceneNodeBase(lua_State* l)
- {
- int res = pwrapInstanceNodegetSceneNodeBase(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class InstanceNode.
- static inline void wrapInstanceNode(lua_State* l)
- {
- LuaBinder::createClass(l, classnameInstanceNode);
- LuaBinder::pushLuaCFuncMethod(l, "getSceneNodeBase", wrapInstanceNodegetSceneNodeBase);
- lua_settop(l, 0);
- }
- //==============================================================================
- // PointLight =
- //==============================================================================
- //==============================================================================
- static const char* classnamePointLight = "PointLight";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<PointLight>()
- {
- return 3561037663389896020;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<PointLight>()
- {
- return classnamePointLight;
- }
- //==============================================================================
- /// Pre-wrap method PointLight::getSceneNodeBase.
- static inline int pwrapPointLightgetSceneNodeBase(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnamePointLight, 3561037663389896020, ud)) return -1;
- PointLight* self = static_cast<PointLight*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- SceneNode& ret = *self;
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "SceneNode");
- ud->m_data = static_cast<void*>(&ret);
- ud->m_gc = false;
- ud->m_sig = -2220074417980276571;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method PointLight::getSceneNodeBase.
- static int wrapPointLightgetSceneNodeBase(lua_State* l)
- {
- int res = pwrapPointLightgetSceneNodeBase(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class PointLight.
- static inline void wrapPointLight(lua_State* l)
- {
- LuaBinder::createClass(l, classnamePointLight);
- LuaBinder::pushLuaCFuncMethod(l, "getSceneNodeBase", wrapPointLightgetSceneNodeBase);
- lua_settop(l, 0);
- }
- //==============================================================================
- // SpotLight =
- //==============================================================================
- //==============================================================================
- static const char* classnameSpotLight = "SpotLight";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<SpotLight>()
- {
- return 7940385212889719421;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<SpotLight>()
- {
- return classnameSpotLight;
- }
- //==============================================================================
- /// Pre-wrap method SpotLight::getSceneNodeBase.
- static inline int pwrapSpotLightgetSceneNodeBase(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 1);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSpotLight, 7940385212889719421, ud)) return -1;
- SpotLight* self = static_cast<SpotLight*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Call the method
- SceneNode& ret = *self;
-
- // Push return value
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "SceneNode");
- ud->m_data = static_cast<void*>(&ret);
- ud->m_gc = false;
- ud->m_sig = -2220074417980276571;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SpotLight::getSceneNodeBase.
- static int wrapSpotLightgetSceneNodeBase(lua_State* l)
- {
- int res = pwrapSpotLightgetSceneNodeBase(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class SpotLight.
- static inline void wrapSpotLight(lua_State* l)
- {
- LuaBinder::createClass(l, classnameSpotLight);
- LuaBinder::pushLuaCFuncMethod(l, "getSceneNodeBase", wrapSpotLightgetSceneNodeBase);
- lua_settop(l, 0);
- }
- //==============================================================================
- // SceneGraph =
- //==============================================================================
- //==============================================================================
- static const char* classnameSceneGraph = "SceneGraph";
- template<>
- I64 LuaBinder::getWrappedTypeSignature<SceneGraph>()
- {
- return -7754439619132389154;
- }
- template<>
- const char* LuaBinder::getWrappedTypeName<SceneGraph>()
- {
- return classnameSceneGraph;
- }
- //==============================================================================
- /// Pre-wrap method SceneGraph::newModelNode.
- static inline int pwrapSceneGraphnewModelNode(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 3);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneGraph, -7754439619132389154, ud)) return -1;
- SceneGraph* self = static_cast<SceneGraph*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 2, arg0)) return -1;
-
- const char* arg1;
- if(LuaBinder::checkString(l, 3, arg1)) return -1;
-
- // Call the method
- ModelNode* ret = newSceneNode<ModelNode>(self, arg0, arg1);
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "ModelNode");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = -1856316251880904290;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneGraph::newModelNode.
- static int wrapSceneGraphnewModelNode(lua_State* l)
- {
- int res = pwrapSceneGraphnewModelNode(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method SceneGraph::newInstanceNode.
- static inline int pwrapSceneGraphnewInstanceNode(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneGraph, -7754439619132389154, ud)) return -1;
- SceneGraph* self = static_cast<SceneGraph*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 2, arg0)) return -1;
-
- // Call the method
- InstanceNode* ret = newSceneNode<InstanceNode>(self, arg0);
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "InstanceNode");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = -2063375830923741403;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneGraph::newInstanceNode.
- static int wrapSceneGraphnewInstanceNode(lua_State* l)
- {
- int res = pwrapSceneGraphnewInstanceNode(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method SceneGraph::newPointLight.
- static inline int pwrapSceneGraphnewPointLight(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneGraph, -7754439619132389154, ud)) return -1;
- SceneGraph* self = static_cast<SceneGraph*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 2, arg0)) return -1;
-
- // Call the method
- PointLight* ret = newSceneNode<PointLight>(self, arg0);
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "PointLight");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = 3561037663389896020;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneGraph::newPointLight.
- static int wrapSceneGraphnewPointLight(lua_State* l)
- {
- int res = pwrapSceneGraphnewPointLight(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Pre-wrap method SceneGraph::newSpotLight.
- static inline int pwrapSceneGraphnewSpotLight(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 2);
-
- // Get "this" as "self"
- if(LuaBinder::checkUserData(l, 1, classnameSceneGraph, -7754439619132389154, ud)) return -1;
- SceneGraph* self = static_cast<SceneGraph*>(ud->m_data);
- ANKI_ASSERT(self != nullptr);
-
- // Pop arguments
- const char* arg0;
- if(LuaBinder::checkString(l, 2, arg0)) return -1;
-
- // Call the method
- SpotLight* ret = newSceneNode<SpotLight>(self, arg0);
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "SpotLight");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = 7940385212889719421;
-
- return 1;
- }
- //==============================================================================
- /// Wrap method SceneGraph::newSpotLight.
- static int wrapSceneGraphnewSpotLight(lua_State* l)
- {
- int res = pwrapSceneGraphnewSpotLight(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap class SceneGraph.
- static inline void wrapSceneGraph(lua_State* l)
- {
- LuaBinder::createClass(l, classnameSceneGraph);
- LuaBinder::pushLuaCFuncMethod(l, "newModelNode", wrapSceneGraphnewModelNode);
- LuaBinder::pushLuaCFuncMethod(l, "newInstanceNode", wrapSceneGraphnewInstanceNode);
- LuaBinder::pushLuaCFuncMethod(l, "newPointLight", wrapSceneGraphnewPointLight);
- LuaBinder::pushLuaCFuncMethod(l, "newSpotLight", wrapSceneGraphnewSpotLight);
- lua_settop(l, 0);
- }
- //==============================================================================
- /// Pre-wrap function getSceneGraph.
- static inline int pwrapgetSceneGraph(lua_State* l)
- {
- UserData* ud;
- (void)ud;
- void* voidp;
- (void)voidp;
-
- LuaBinder::checkArgsCount(l, 0);
-
- // Call the function
- SceneGraph* ret = getSceneGraph(l);
-
- // Push return value
- if(ANKI_UNLIKELY(ret == nullptr))
- {
- lua_pushstring(l, "Glue code returned nullptr");
- return -1;
- }
-
- voidp = lua_newuserdata(l, sizeof(UserData));
- ud = static_cast<UserData*>(voidp);
- luaL_setmetatable(l, "SceneGraph");
- ud->m_data = static_cast<void*>(ret);
- ud->m_gc = false;
- ud->m_sig = -7754439619132389154;
-
- return 1;
- }
- //==============================================================================
- /// Wrap function getSceneGraph.
- static int wrapgetSceneGraph(lua_State* l)
- {
- int res = pwrapgetSceneGraph(l);
- if(res >= 0) return res;
- lua_error(l);
- return 0;
- }
- //==============================================================================
- /// Wrap the module.
- void wrapModuleScene(lua_State* l)
- {
- wrapMoveComponent(l);
- wrapLightComponent(l);
- wrapSceneNode(l);
- wrapModelNode(l);
- wrapInstanceNode(l);
- wrapPointLight(l);
- wrapSpotLight(l);
- wrapSceneGraph(l);
- LuaBinder::pushLuaCFunc(l, "getSceneGraph", wrapgetSceneGraph);
- }
- } // end namespace anki
|