From 22da4c48323420dfea54d950b609b486a0d23c56 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Thu, 9 Apr 2015 03:50:13 +0000 Subject: [PATCH] [AUTO]: updating luabinding automatically --- .../lua-bindings/auto/api/Terrain.lua | 108 +-- .../auto/lua_cocos2dx_3d_auto.cpp | 776 ++++++++++-------- .../auto/lua_cocos2dx_3d_auto.hpp | 1 + 3 files changed, 470 insertions(+), 415 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Terrain.lua b/cocos/scripting/lua-bindings/auto/api/Terrain.lua index 193806ea1f..c2cad4facf 100644 --- a/cocos/scripting/lua-bindings/auto/api/Terrain.lua +++ b/cocos/scripting/lua-bindings/auto/api/Terrain.lua @@ -11,44 +11,6 @@ -- @param #char heightMap -- @return bool#bool ret (return value: bool) --------------------------------- --- set the MaxDetailAmount. --- @function [parent=#Terrain] setMaxDetailMapAmount --- @param self --- @param #int maxValue --- @return Terrain#Terrain self (return value: cc.Terrain) - --------------------------------- --- show the wireline instead of the surface,Debug Use only.
--- Note only support desktop platform --- @function [parent=#Terrain] setDrawWire --- @param self --- @param #bool boolValue --- @return Terrain#Terrain self (return value: cc.Terrain) - --------------------------------- --- Switch frustum Culling Flag
--- Note frustum culling will remarkable improve your terrain rendering performance. --- @function [parent=#Terrain] setIsEnableFrustumCull --- @param self --- @param #bool boolValue --- @return Terrain#Terrain self (return value: cc.Terrain) - --------------------------------- --- set the Detail Map --- @function [parent=#Terrain] setDetailMap --- @param self --- @param #unsigned int index --- @param #cc.Terrain::DetailMap detailMap --- @return Terrain#Terrain self (return value: cc.Terrain) - --------------------------------- --- reset the heightmap data. --- @function [parent=#Terrain] resetHeightMap --- @param self --- @param #char heightMap --- @return Terrain#Terrain self (return value: cc.Terrain) - -------------------------------- -- set the alpha map -- @function [parent=#Terrain] setAlphaMap @@ -82,16 +44,6 @@ -- @param self -- @return bool#bool ret (return value: bool) --------------------------------- --- Set threshold distance of each LOD level,must equal or gereater than the chunk size
--- Note when invoke initHeightMap, the LOD distance will be automatic calculated. --- @function [parent=#Terrain] setLODDistance --- @param self --- @param #float lod1 --- @param #float lod2 --- @param #float lod3 --- @return Terrain#Terrain self (return value: cc.Terrain) - -------------------------------- -- get the normal of the specified pistion in terrain
-- return the normal vector of the specified position of the terrain.
@@ -102,6 +54,28 @@ -- @param #int pixelY -- @return vec3_table#vec3_table ret (return value: vec3_table) +-------------------------------- +-- show the wireline instead of the surface,Debug Use only.
+-- Note only support desktop platform +-- @function [parent=#Terrain] setDrawWire +-- @param self +-- @param #bool boolValue +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- +-- @function [parent=#Terrain] reload +-- @param self +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- set the Detail Map +-- @function [parent=#Terrain] setDetailMap +-- @param self +-- @param #unsigned int index +-- @param #cc.Terrain::DetailMap detailMap +-- @return Terrain#Terrain self (return value: cc.Terrain) + -------------------------------- -- get height from the raw height filed -- @function [parent=#Terrain] getImageHeight @@ -110,6 +84,29 @@ -- @param #int pixelY -- @return float#float ret (return value: float) +-------------------------------- +-- get the terrain's mininal height. +-- @function [parent=#Terrain] getMinHeight +-- @param self +-- @return float#float ret (return value: float) + +-------------------------------- +-- Set threshold distance of each LOD level,must equal or gereater than the chunk size
+-- Note when invoke initHeightMap, the LOD distance will be automatic calculated. +-- @function [parent=#Terrain] setLODDistance +-- @param self +-- @param #float lod1 +-- @param #float lod2 +-- @param #float lod3 +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- reset the heightmap data. +-- @function [parent=#Terrain] resetHeightMap +-- @param self +-- @param #char heightMap +-- @return Terrain#Terrain self (return value: cc.Terrain) + -------------------------------- -- get the terrain's maximum height. -- @function [parent=#Terrain] getMaxHeight @@ -117,10 +114,19 @@ -- @return float#float ret (return value: float) -------------------------------- --- get the terrain's mininal height. --- @function [parent=#Terrain] getMinHeight +-- set the MaxDetailAmount. +-- @function [parent=#Terrain] setMaxDetailMapAmount -- @param self --- @return float#float ret (return value: float) +-- @param #int maxValue +-- @return Terrain#Terrain self (return value: cc.Terrain) + +-------------------------------- +-- Switch frustum Culling Flag
+-- Note frustum culling will remarkable improve your terrain rendering performance. +-- @function [parent=#Terrain] setIsEnableFrustumCull +-- @param self +-- @param #bool boolValue +-- @return Terrain#Terrain self (return value: cc.Terrain) -------------------------------- -- diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp index 63ed4d4103..cd741a8254 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -3459,260 +3459,6 @@ int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", 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.Terrain:setMaxDetailMapAmount"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr); - return 0; - } - cobj->setMaxDetailMapAmount(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); - return 0; - } - cobj->setDrawWire(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - bool arg0; - - ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); - return 0; - } - cobj->setIsEnableFrustumCull(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - unsigned int arg0; - cocos2d::Terrain::DetailMap arg1; - - ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap"); - - #pragma warning NO CONVERSION TO NATIVE FOR DetailMap - ok = false; - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); - return 0; - } - cobj->setDetailMap(arg0, arg1); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - const char* arg0; - - std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str(); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); - return 0; - } - cobj->resetHeightMap(arg0); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S) { int argc = 0; @@ -3957,62 +3703,6 @@ int lua_cocos2dx_3d_Terrain_initProperties(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 3) - { - double arg0; - double arg1; - double arg2; - - ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance"); - - ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance"); - - ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance"); - if(!ok) - { - tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); - return 0; - } - cobj->setLODDistance(arg0, arg1, arg2); - lua_settop(tolua_S, 1); - return 1; - } - luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S) { int argc = 0; @@ -4066,6 +3756,157 @@ int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S) return 0; } +int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr); + return 0; + } + cobj->setDrawWire(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_reload'", 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_Terrain_reload'", nullptr); + return 0; + } + cobj->reload(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:reload",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_reload'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 2) + { + unsigned int arg0; + cocos2d::Terrain::DetailMap arg1; + + ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap"); + + #pragma warning NO CONVERSION TO NATIVE FOR DetailMap + ok = false; + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr); + return 0; + } + cobj->setDetailMap(arg0, arg1); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S) { int argc = 0; @@ -4119,53 +3960,6 @@ int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S) return 0; } -int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", 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_Terrain_getMaxHeight'", nullptr); - return 0; - } - double ret = cobj->getMaxHeight(); - 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.Terrain:getMaxHeight",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'.",&tolua_err); -#endif - - return 0; -} int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S) { int argc = 0; @@ -4213,6 +4007,259 @@ int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S) return 0; } +int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 3) + { + double arg0; + double arg1; + double arg2; + + ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance"); + + ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance"); + + ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr); + return 0; + } + cobj->setLODDistance(arg0, arg1, arg2); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + const char* arg0; + + std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str(); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr); + return 0; + } + cobj->resetHeightMap(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'", 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_Terrain_getMaxHeight'", nullptr); + return 0; + } + double ret = cobj->getMaxHeight(); + 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.Terrain:getMaxHeight",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMaxHeight'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", 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.Terrain:setMaxDetailMapAmount"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr); + return 0; + } + cobj->setMaxDetailMapAmount(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err); +#endif + + return 0; +} +int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); + return 0; + } +#endif + + argc = lua_gettop(tolua_S)-1; + if (argc == 1) + { + bool arg0; + + ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull"); + if(!ok) + { + tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr); + return 0; + } + cobj->setIsEnableFrustumCull(arg0); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err); +#endif + + return 0; +} static int lua_cocos2dx_3d_Terrain_finalize(lua_State* tolua_S) { printf("luabindings: finalizing LUA object (Terrain)"); @@ -4226,21 +4273,22 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S) tolua_beginmodule(tolua_S,"Terrain"); tolua_function(tolua_S,"initHeightMap",lua_cocos2dx_3d_Terrain_initHeightMap); - tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount); - tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire); - tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull); - tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap); - tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap); tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap); tolua_function(tolua_S,"setSkirtHeightRatio",lua_cocos2dx_3d_Terrain_setSkirtHeightRatio); tolua_function(tolua_S,"convertToTerrainSpace",lua_cocos2dx_3d_Terrain_convertToTerrainSpace); tolua_function(tolua_S,"initTextures",lua_cocos2dx_3d_Terrain_initTextures); tolua_function(tolua_S,"initProperties",lua_cocos2dx_3d_Terrain_initProperties); - tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance); tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal); + tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire); + tolua_function(tolua_S,"reload",lua_cocos2dx_3d_Terrain_reload); + tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap); tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight); - tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight); tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight); + tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance); + tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap); + tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight); + tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount); + tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::Terrain).name(); g_luaType[typeName] = "cc.Terrain"; diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp index 52618ba4a0..b26b4797b2 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -101,6 +101,7 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); + #endif // __cocos2dx_3d_h__