diff --git a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 49ff596c46..91c279277c 100644 --- a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -1988,6 +1988,56 @@ int lua_cocos2dx_3d_Mesh_setProgramState(lua_State* tolua_S) return 0; } +int lua_cocos2dx_3d_Mesh_setIndexFormat(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Mesh* cobj = nullptr; + bool ok = true; + +#if COCOS2D_DEBUG >= 1 + tolua_Error tolua_err; +#endif + + +#if COCOS2D_DEBUG >= 1 + if (!tolua_isusertype(tolua_S,1,"cc.Mesh",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Mesh*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_setIndexFormat'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + cocos2d::backend::IndexFormat arg0; + + ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Mesh:setIndexFormat"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Mesh_setIndexFormat'", nullptr); + return 0; + } + cobj->setIndexFormat(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Mesh:setIndexFormat",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Mesh_setIndexFormat'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_3d_Mesh_setMaterial(lua_State* tolua_S) { int argc = 0; @@ -2791,6 +2841,7 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S) tolua_function(tolua_S,"getMaterial",lua_cocos2dx_3d_Mesh_getMaterial); tolua_function(tolua_S,"getVertexSizeInBytes",lua_cocos2dx_3d_Mesh_getVertexSizeInBytes); tolua_function(tolua_S,"setProgramState",lua_cocos2dx_3d_Mesh_setProgramState); + tolua_function(tolua_S,"setIndexFormat",lua_cocos2dx_3d_Mesh_setIndexFormat); tolua_function(tolua_S,"setMaterial",lua_cocos2dx_3d_Mesh_setMaterial); tolua_function(tolua_S,"getName",lua_cocos2dx_3d_Mesh_getName); tolua_function(tolua_S,"getMeshVertexAttribute",lua_cocos2dx_3d_Mesh_getMeshVertexAttribute); @@ -3600,1694 +3651,6 @@ int lua_register_cocos2dx_3d_Skybox(lua_State* tolua_S) return 1; } -int lua_cocos2dx_3d_MeshRenderer_setCullFaceEnabled(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setCullFaceEnabled'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.MeshRenderer:setCullFaceEnabled"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_setCullFaceEnabled'", nullptr); - return 0; - } - cobj->setCullFaceEnabled(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setCullFaceEnabled",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setCullFaceEnabled'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setTexture(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setTexture'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 1) { - cocos2d::Texture2D* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Texture2D",&arg0, "cc.MeshRenderer:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - std::string_view arg0; - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRenderer:setTexture"); - - if (!ok) { break; } - cobj->setTexture(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setTexture",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setTexture'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getLightMask(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getLightMask'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getLightMask'", nullptr); - return 0; - } - unsigned int ret = cobj->getLightMask(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getLightMask",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getLightMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getMaterial(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getMaterial'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.MeshRenderer:getMaterial"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getMaterial'", nullptr); - return 0; - } - cocos2d::Material* ret = cobj->getMaterial(arg0); - object_to_luaval(tolua_S, "cc.Material",(cocos2d::Material*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getMaterial",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getMaterial'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setCullFace(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setCullFace'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::backend::CullMode arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.MeshRenderer:setCullFace"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_setCullFace'", nullptr); - return 0; - } - cobj->setCullFace(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setCullFace",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setCullFace'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getMeshes(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getMeshes'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getMeshes'", nullptr); - return 0; - } - const cocos2d::Vector& ret = cobj->getMeshes(); - ccvector_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getMeshes",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getMeshes'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_removeAllAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_removeAllAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_removeAllAttachNode'", nullptr); - return 0; - } - cobj->removeAllAttachNode(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:removeAllAttachNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_removeAllAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setMaterial(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setMaterial'", nullptr); - return 0; - } -#endif - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.MeshRenderer:setMaterial"); - - if (!ok) { break; } - int arg1; - ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1, "cc.MeshRenderer:setMaterial"); - - if (!ok) { break; } - cobj->setMaterial(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 1) { - cocos2d::Material* arg0; - ok &= luaval_to_object(tolua_S, 2, "cc.Material",&arg0, "cc.MeshRenderer:setMaterial"); - - if (!ok) { break; } - cobj->setMaterial(arg0); - lua_settop(tolua_S, 1); - return 1; - } - }while(0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setMaterial",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setMaterial'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getMesh(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getMesh'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getMesh'", nullptr); - return 0; - } - cocos2d::Mesh* ret = cobj->getMesh(); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getMesh",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getMesh'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getMeshCount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getMeshCount'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getMeshCount'", nullptr); - return 0; - } - ssize_t ret = cobj->getMeshCount(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getMeshCount",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getMeshCount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getMeshByIndex(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getMeshByIndex'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - int arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.MeshRenderer:getMeshByIndex"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getMeshByIndex'", nullptr); - return 0; - } - cocos2d::Mesh* ret = cobj->getMeshByIndex(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getMeshByIndex",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getMeshByIndex'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_isForceDepthWrite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_isForceDepthWrite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_isForceDepthWrite'", nullptr); - return 0; - } - bool ret = cobj->isForceDepthWrite(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:isForceDepthWrite",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_isForceDepthWrite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getBlendFunc'", nullptr); - return 0; - } - const cocos2d::BlendFunc& ret = cobj->getBlendFunc(); - blendfunc_to_luaval(tolua_S, ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getBlendFunc",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setLightMask(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setLightMask'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - unsigned int arg0; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.MeshRenderer:setLightMask"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_setLightMask'", nullptr); - return 0; - } - cobj->setLightMask(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setLightMask",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setLightMask'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string_view arg0; - - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRenderer:getAttachNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getAttachNode'", nullptr); - return 0; - } - cocos2d::AttachNode* ret = cobj->getAttachNode(arg0); - object_to_luaval(tolua_S, "cc.AttachNode",(cocos2d::AttachNode*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setBlendFunc(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setBlendFunc'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::BlendFunc arg0; - - ok &= luaval_to_blendfunc(tolua_S, 2, &arg0, "cc.MeshRenderer:setBlendFunc"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_setBlendFunc'", nullptr); - return 0; - } - cobj->setBlendFunc(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setBlendFunc",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setBlendFunc'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setForce2DQueue(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setForce2DQueue'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.MeshRenderer:setForce2DQueue"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_setForce2DQueue'", nullptr); - return 0; - } - cobj->setForce2DQueue(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setForce2DQueue",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setForce2DQueue'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_genMaterial(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_genMaterial'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_genMaterial'", nullptr); - return 0; - } - cobj->genMaterial(); - lua_settop(tolua_S, 1); - return 1; - } - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.MeshRenderer:genMaterial"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_genMaterial'", nullptr); - return 0; - } - cobj->genMaterial(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:genMaterial",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_genMaterial'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_removeAttachNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_removeAttachNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string_view arg0; - - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRenderer:removeAttachNode"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_removeAttachNode'", nullptr); - return 0; - } - cobj->removeAttachNode(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:removeAttachNode",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_removeAttachNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getSkeleton(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getSkeleton'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getSkeleton'", nullptr); - return 0; - } - cocos2d::Skeleton3D* ret = cobj->getSkeleton(); - object_to_luaval(tolua_S, "cc.Skeleton3D",(cocos2d::Skeleton3D*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getSkeleton",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getSkeleton'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_setForceDepthWrite(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_setForceDepthWrite'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.MeshRenderer:setForceDepthWrite"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_setForceDepthWrite'", nullptr); - return 0; - } - cobj->setForceDepthWrite(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:setForceDepthWrite",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_setForceDepthWrite'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_getMeshByName(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRenderer_getMeshByName'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string_view arg0; - - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRenderer:getMeshByName"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRenderer_getMeshByName'", nullptr); - return 0; - } - cocos2d::Mesh* ret = cobj->getMeshByName(arg0); - object_to_luaval(tolua_S, "cc.Mesh",(cocos2d::Mesh*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRenderer:getMeshByName",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_getMeshByName'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRenderer_create(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 1) - { - std::string_view arg0; - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRenderer:create"); - if (!ok) { break; } - cocos2d::MeshRenderer* ret = cocos2d::MeshRenderer::create(arg0); - object_to_luaval(tolua_S, "cc.MeshRenderer",(cocos2d::MeshRenderer*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 0) - { - cocos2d::MeshRenderer* ret = cocos2d::MeshRenderer::create(); - object_to_luaval(tolua_S, "cc.MeshRenderer",(cocos2d::MeshRenderer*)ret); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - std::string_view arg0; - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRenderer:create"); - if (!ok) { break; } - std::string_view arg1; - ok &= luaval_to_std_string_view(tolua_S, 3,&arg1, "cc.MeshRenderer:create"); - if (!ok) { break; } - cocos2d::MeshRenderer* ret = cocos2d::MeshRenderer::create(arg0, arg1); - object_to_luaval(tolua_S, "cc.MeshRenderer",(cocos2d::MeshRenderer*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.MeshRenderer:create",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRenderer_create'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_MeshRenderer_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (MeshRenderer)"); - return 0; -} - -int lua_register_cocos2dx_3d_MeshRenderer(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.MeshRenderer"); - tolua_cclass(tolua_S,"MeshRenderer","cc.MeshRenderer","cc.Node",nullptr); - - tolua_beginmodule(tolua_S,"MeshRenderer"); - tolua_function(tolua_S,"setCullFaceEnabled",lua_cocos2dx_3d_MeshRenderer_setCullFaceEnabled); - tolua_function(tolua_S,"setTexture",lua_cocos2dx_3d_MeshRenderer_setTexture); - tolua_function(tolua_S,"getLightMask",lua_cocos2dx_3d_MeshRenderer_getLightMask); - tolua_function(tolua_S,"getMaterial",lua_cocos2dx_3d_MeshRenderer_getMaterial); - tolua_function(tolua_S,"setCullFace",lua_cocos2dx_3d_MeshRenderer_setCullFace); - tolua_function(tolua_S,"getMeshes",lua_cocos2dx_3d_MeshRenderer_getMeshes); - tolua_function(tolua_S,"removeAllAttachNode",lua_cocos2dx_3d_MeshRenderer_removeAllAttachNode); - tolua_function(tolua_S,"setMaterial",lua_cocos2dx_3d_MeshRenderer_setMaterial); - tolua_function(tolua_S,"getMesh",lua_cocos2dx_3d_MeshRenderer_getMesh); - tolua_function(tolua_S,"getMeshCount",lua_cocos2dx_3d_MeshRenderer_getMeshCount); - tolua_function(tolua_S,"getMeshByIndex",lua_cocos2dx_3d_MeshRenderer_getMeshByIndex); - tolua_function(tolua_S,"isForceDepthWrite",lua_cocos2dx_3d_MeshRenderer_isForceDepthWrite); - tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_3d_MeshRenderer_getBlendFunc); - tolua_function(tolua_S,"setLightMask",lua_cocos2dx_3d_MeshRenderer_setLightMask); - tolua_function(tolua_S,"getAttachNode",lua_cocos2dx_3d_MeshRenderer_getAttachNode); - tolua_function(tolua_S,"setBlendFunc",lua_cocos2dx_3d_MeshRenderer_setBlendFunc); - tolua_function(tolua_S,"setForce2DQueue",lua_cocos2dx_3d_MeshRenderer_setForce2DQueue); - tolua_function(tolua_S,"genMaterial",lua_cocos2dx_3d_MeshRenderer_genMaterial); - tolua_function(tolua_S,"removeAttachNode",lua_cocos2dx_3d_MeshRenderer_removeAttachNode); - tolua_function(tolua_S,"getSkeleton",lua_cocos2dx_3d_MeshRenderer_getSkeleton); - tolua_function(tolua_S,"setForceDepthWrite",lua_cocos2dx_3d_MeshRenderer_setForceDepthWrite); - tolua_function(tolua_S,"getMeshByName",lua_cocos2dx_3d_MeshRenderer_getMeshByName); - tolua_function(tolua_S,"create", lua_cocos2dx_3d_MeshRenderer_create); - tolua_endmodule(tolua_S); - auto typeName = typeid(cocos2d::MeshRenderer).name(); // rtti is literal storage - g_luaType[reinterpret_cast(typeName)] = "cc.MeshRenderer"; - g_typeCast[typeName] = "cc.MeshRenderer"; - return 1; -} - -int lua_cocos2dx_3d_MeshRendererCache_removeMeshRendererData(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRendererCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRendererCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRendererCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRendererCache_removeMeshRendererData'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - std::string_view arg0; - - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshRendererCache:removeMeshRendererData"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRendererCache_removeMeshRendererData'", nullptr); - return 0; - } - cobj->removeMeshRendererData(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRendererCache:removeMeshRendererData",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRendererCache_removeMeshRendererData'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRendererCache_removeAllMeshRendererData(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRendererCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshRendererCache",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshRendererCache*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshRendererCache_removeAllMeshRendererData'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRendererCache_removeAllMeshRendererData'", nullptr); - return 0; - } - cobj->removeAllMeshRendererData(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRendererCache:removeAllMeshRendererData",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRendererCache_removeAllMeshRendererData'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshRendererCache_destroyInstance(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshRendererCache",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRendererCache_destroyInstance'", nullptr); - return 0; - } - cocos2d::MeshRendererCache::destroyInstance(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.MeshRendererCache:destroyInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRendererCache_destroyInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_MeshRendererCache_getInstance(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshRendererCache",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRendererCache_getInstance'", nullptr); - return 0; - } - cocos2d::MeshRendererCache* ret = cocos2d::MeshRendererCache::getInstance(); - object_to_luaval(tolua_S, "cc.MeshRendererCache",(cocos2d::MeshRendererCache*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.MeshRendererCache:getInstance",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRendererCache_getInstance'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_MeshRendererCache_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshRendererCache* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshRendererCache_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::MeshRendererCache(); - tolua_pushusertype(tolua_S,(void*)cobj,"cc.MeshRendererCache"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshRendererCache:MeshRendererCache",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshRendererCache_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_3d_MeshRendererCache_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (MeshRendererCache)"); - return 0; -} - -int lua_register_cocos2dx_3d_MeshRendererCache(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.MeshRendererCache"); - tolua_cclass(tolua_S,"MeshRendererCache","cc.MeshRendererCache","",nullptr); - - tolua_beginmodule(tolua_S,"MeshRendererCache"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_MeshRendererCache_constructor); - tolua_function(tolua_S,"removeMeshRendererData",lua_cocos2dx_3d_MeshRendererCache_removeMeshRendererData); - tolua_function(tolua_S,"removeAllMeshRendererData",lua_cocos2dx_3d_MeshRendererCache_removeAllMeshRendererData); - tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_3d_MeshRendererCache_destroyInstance); - tolua_function(tolua_S,"getInstance", lua_cocos2dx_3d_MeshRendererCache_getInstance); - tolua_endmodule(tolua_S); - auto typeName = typeid(cocos2d::MeshRendererCache).name(); // rtti is literal storage - g_luaType[reinterpret_cast(typeName)] = "cc.MeshRendererCache"; - g_typeCast[typeName] = "cc.MeshRendererCache"; - return 1; -} - -int lua_cocos2dx_3d_MeshMaterial_getMaterialType(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::MeshMaterial* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.MeshMaterial",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::MeshMaterial*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_MeshMaterial_getMaterialType'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshMaterial_getMaterialType'", nullptr); - return 0; - } - int ret = (int)cobj->getMaterialType(); - tolua_pushnumber(tolua_S,(lua_Number)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MeshMaterial:getMaterialType",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshMaterial_getMaterialType'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_MeshMaterial_createWithFilename(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshMaterial",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - std::string_view arg0; - ok &= luaval_to_std_string_view(tolua_S, 2,&arg0, "cc.MeshMaterial:createWithFilename"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshMaterial_createWithFilename'", nullptr); - return 0; - } - cocos2d::MeshMaterial* ret = cocos2d::MeshMaterial::createWithFilename(arg0); - object_to_luaval(tolua_S, "cc.MeshMaterial",(cocos2d::MeshMaterial*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.MeshMaterial:createWithFilename",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshMaterial_createWithFilename'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_MeshMaterial_releaseCachedMaterial(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshMaterial",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshMaterial_releaseCachedMaterial'", nullptr); - return 0; - } - cocos2d::MeshMaterial::releaseCachedMaterial(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.MeshMaterial:releaseCachedMaterial",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshMaterial_releaseCachedMaterial'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_MeshMaterial_createBuiltInMaterial(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshMaterial",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S)-1; - - do - { - if (argc == 0) - { - cocos2d::MeshMaterial::createBuiltInMaterial(); - lua_settop(tolua_S, 1); - return 1; - } - } while (0); - ok = true; - do - { - if (argc == 2) - { - cocos2d::MeshMaterial::MaterialType arg0; - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.MeshMaterial:createBuiltInMaterial"); - if (!ok) { break; } - bool arg1; - ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.MeshMaterial:createBuiltInMaterial"); - if (!ok) { break; } - cocos2d::MeshMaterial* ret = cocos2d::MeshMaterial::createBuiltInMaterial(arg0, arg1); - object_to_luaval(tolua_S, "cc.MeshMaterial",(cocos2d::MeshMaterial*)ret); - return 1; - } - } while (0); - ok = true; - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.MeshMaterial:createBuiltInMaterial",argc, 2); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshMaterial_createBuiltInMaterial'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_MeshMaterial_releaseBuiltInMaterial(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshMaterial",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshMaterial_releaseBuiltInMaterial'", nullptr); - return 0; - } - cocos2d::MeshMaterial::releaseBuiltInMaterial(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.MeshMaterial:releaseBuiltInMaterial",argc, 0); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshMaterial_releaseBuiltInMaterial'.",&tolua_err); -#endif - return 0; -} -int lua_cocos2dx_3d_MeshMaterial_createWithProgramState(lua_State* tolua_S) -{ - int argc = 0; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertable(tolua_S,1,"cc.MeshMaterial",0,&tolua_err)) goto tolua_lerror; -#endif - - argc = lua_gettop(tolua_S) - 1; - - if (argc == 1) - { - cocos2d::backend::ProgramState* arg0; - ok &= luaval_to_object(tolua_S, 2, "ccb.ProgramState",&arg0, "cc.MeshMaterial:createWithProgramState"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_MeshMaterial_createWithProgramState'", nullptr); - return 0; - } - cocos2d::MeshMaterial* ret = cocos2d::MeshMaterial::createWithProgramState(arg0); - object_to_luaval(tolua_S, "cc.MeshMaterial",(cocos2d::MeshMaterial*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.MeshMaterial:createWithProgramState",argc, 1); - return 0; -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_MeshMaterial_createWithProgramState'.",&tolua_err); -#endif - return 0; -} -static int lua_cocos2dx_3d_MeshMaterial_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (MeshMaterial)"); - return 0; -} - -int lua_register_cocos2dx_3d_MeshMaterial(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.MeshMaterial"); - tolua_cclass(tolua_S,"MeshMaterial","cc.MeshMaterial","cc.Material",nullptr); - - tolua_beginmodule(tolua_S,"MeshMaterial"); - tolua_function(tolua_S,"getMaterialType",lua_cocos2dx_3d_MeshMaterial_getMaterialType); - tolua_function(tolua_S,"createWithFilename", lua_cocos2dx_3d_MeshMaterial_createWithFilename); - tolua_function(tolua_S,"releaseCachedMaterial", lua_cocos2dx_3d_MeshMaterial_releaseCachedMaterial); - tolua_function(tolua_S,"createBuiltInMaterial", lua_cocos2dx_3d_MeshMaterial_createBuiltInMaterial); - tolua_function(tolua_S,"releaseBuiltInMaterial", lua_cocos2dx_3d_MeshMaterial_releaseBuiltInMaterial); - tolua_function(tolua_S,"createWithProgramState", lua_cocos2dx_3d_MeshMaterial_createWithProgramState); - tolua_endmodule(tolua_S); - auto typeName = typeid(cocos2d::MeshMaterial).name(); // rtti is literal storage - g_luaType[reinterpret_cast(typeName)] = "cc.MeshMaterial"; - g_typeCast[typeName] = "cc.MeshMaterial"; - return 1; -} - int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S) { int argc = 0; @@ -6988,19 +5351,16 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S) tolua_module(tolua_S,"cc",0); tolua_beginmodule(tolua_S,"cc"); - lua_register_cocos2dx_3d_MeshRenderer(tolua_S); - lua_register_cocos2dx_3d_TextureCube(tolua_S); - lua_register_cocos2dx_3d_BillBoard(tolua_S); - lua_register_cocos2dx_3d_Mesh(tolua_S); lua_register_cocos2dx_3d_Animate3D(tolua_S); lua_register_cocos2dx_3d_AttachNode(tolua_S); - lua_register_cocos2dx_3d_Animation3D(tolua_S); - lua_register_cocos2dx_3d_Skeleton3D(tolua_S); - lua_register_cocos2dx_3d_MeshMaterial(tolua_S); - lua_register_cocos2dx_3d_MeshRendererCache(tolua_S); + lua_register_cocos2dx_3d_TextureCube(tolua_S); lua_register_cocos2dx_3d_Terrain(tolua_S); - lua_register_cocos2dx_3d_Bundle3D(tolua_S); lua_register_cocos2dx_3d_Skybox(tolua_S); + lua_register_cocos2dx_3d_Bundle3D(tolua_S); + lua_register_cocos2dx_3d_Skeleton3D(tolua_S); + lua_register_cocos2dx_3d_BillBoard(tolua_S); + lua_register_cocos2dx_3d_Animation3D(tolua_S); + lua_register_cocos2dx_3d_Mesh(tolua_S); tolua_endmodule(tolua_S); return 1; diff --git a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp index f27202077c..c5d8275eb7 100644 --- a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -99,42 +99,6 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_backend_auto.cpp b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_backend_auto.cpp index 2523bad860..c7eb8b5166 100644 --- a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_backend_auto.cpp +++ b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_backend_auto.cpp @@ -144,8 +144,8 @@ int lua_register_cocos2dx_backend_IndexFormat(lua_State* tolua_S) { tolua_module(tolua_S, "IndexFormat", 0); tolua_beginmodule(tolua_S,"IndexFormat"); - tolua_constant(tolua_S, "U_SHORT", 0); - tolua_constant(tolua_S, "U_INT", 1); + tolua_constant(tolua_S, "U_SHORT", 1); + tolua_constant(tolua_S, "U_INT", 2); tolua_endmodule(tolua_S); auto typeName = typeid(cocos2d::backend::IndexFormat).name(); // rtti is literal storage diff --git a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp index 6675ee663f..925f48f84c 100644 --- a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp +++ b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp @@ -3972,258 +3972,6 @@ int lua_register_cocos2dx_physics3d_Physics3DComponent(lua_State* tolua_S) return 1; } -int lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncNodeToPhysics(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::PhysicsMeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.PhysicsMeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::PhysicsMeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncNodeToPhysics'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncNodeToPhysics'", nullptr); - return 0; - } - cobj->syncNodeToPhysics(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsMeshRenderer:syncNodeToPhysics",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncNodeToPhysics'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncPhysicsToNode(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::PhysicsMeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.PhysicsMeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::PhysicsMeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncPhysicsToNode'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncPhysicsToNode'", nullptr); - return 0; - } - cobj->syncPhysicsToNode(); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsMeshRenderer:syncPhysicsToNode",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncPhysicsToNode'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_physics3d_PhysicsMeshRenderer_getPhysicsObj(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::PhysicsMeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.PhysicsMeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::PhysicsMeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_getPhysicsObj'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_getPhysicsObj'", nullptr); - return 0; - } - cocos2d::Physics3DObject* ret = cobj->getPhysicsObj(); - object_to_luaval(tolua_S, "cc.Physics3DObject",(cocos2d::Physics3DObject*)ret); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsMeshRenderer:getPhysicsObj",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_getPhysicsObj'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_physics3d_PhysicsMeshRenderer_setSyncFlag(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::PhysicsMeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - -#if COCOS2D_DEBUG >= 1 - if (!tolua_isusertype(tolua_S,1,"cc.PhysicsMeshRenderer",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::PhysicsMeshRenderer*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_setSyncFlag'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Physics3DComponent::PhysicsSyncFlag arg0; - - ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.PhysicsMeshRenderer:setSyncFlag"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_setSyncFlag'", nullptr); - return 0; - } - cobj->setSyncFlag(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsMeshRenderer:setSyncFlag",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_setSyncFlag'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_physics3d_PhysicsMeshRenderer_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::PhysicsMeshRenderer* cobj = nullptr; - bool ok = true; - -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_constructor'", nullptr); - return 0; - } - cobj = new cocos2d::PhysicsMeshRenderer(); - cobj->autorelease(); - int ID = (int)cobj->_ID ; - int* luaID = &cobj->_luaID ; - toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.PhysicsMeshRenderer"); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsMeshRenderer:PhysicsMeshRenderer",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_PhysicsMeshRenderer_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_physics3d_PhysicsMeshRenderer_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (PhysicsMeshRenderer)"); - return 0; -} - -int lua_register_cocos2dx_physics3d_PhysicsMeshRenderer(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.PhysicsMeshRenderer"); - tolua_cclass(tolua_S,"PhysicsMeshRenderer","cc.PhysicsMeshRenderer","cc.Sprite3D",nullptr); - - tolua_beginmodule(tolua_S,"PhysicsMeshRenderer"); - tolua_function(tolua_S,"new",lua_cocos2dx_physics3d_PhysicsMeshRenderer_constructor); - tolua_function(tolua_S,"syncNodeToPhysics",lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncNodeToPhysics); - tolua_function(tolua_S,"syncPhysicsToNode",lua_cocos2dx_physics3d_PhysicsMeshRenderer_syncPhysicsToNode); - tolua_function(tolua_S,"getPhysicsObj",lua_cocos2dx_physics3d_PhysicsMeshRenderer_getPhysicsObj); - tolua_function(tolua_S,"setSyncFlag",lua_cocos2dx_physics3d_PhysicsMeshRenderer_setSyncFlag); - tolua_endmodule(tolua_S); - auto typeName = typeid(cocos2d::PhysicsMeshRenderer).name(); // rtti is literal storage - g_luaType[reinterpret_cast(typeName)] = "cc.PhysicsMeshRenderer"; - g_typeCast[typeName] = "cc.PhysicsMeshRenderer"; - return 1; -} - int lua_cocos2dx_physics3d_Physics3DWorld_setGravity(lua_State* tolua_S) { int argc = 0; @@ -12373,7 +12121,6 @@ TOLUA_API int register_all_cocos2dx_physics3d(lua_State* tolua_S) lua_register_cocos2dx_physics3d_Physics3DComponent(tolua_S); lua_register_cocos2dx_physics3d_Physics3DConeTwistConstraint(tolua_S); lua_register_cocos2dx_physics3d_Physics3DPointToPointConstraint(tolua_S); - lua_register_cocos2dx_physics3d_PhysicsMeshRenderer(tolua_S); lua_register_cocos2dx_physics3d_Physics3DHingeConstraint(tolua_S); lua_register_cocos2dx_physics3d_Physics3DShape(tolua_S); diff --git a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp index 827eef1d02..c344e9a9c5 100644 --- a/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp +++ b/extensions/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp @@ -246,12 +246,6 @@ int register_all_cocos2dx_physics3d(lua_State* tolua_S); - - - - - -