From 53cde3f3b25e2015bbc9d7781f7b14fd505c52a3 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Fri, 10 Oct 2014 08:39:46 +0000 Subject: [PATCH] [AUTO]: updating luabinding automatically --- .../scripting/lua-bindings/auto/api/AABB.lua | 64 -- cocos/scripting/lua-bindings/auto/api/OBB.lua | 40 - .../auto/api/lua_cocos2dx_3d_auto_api.lua | 10 - .../auto/lua_cocos2dx_3d_auto.cpp | 708 ------------------ .../auto/lua_cocos2dx_3d_auto.hpp | 16 - 5 files changed, 838 deletions(-) delete mode 100644 cocos/scripting/lua-bindings/auto/api/AABB.lua delete mode 100644 cocos/scripting/lua-bindings/auto/api/OBB.lua diff --git a/cocos/scripting/lua-bindings/auto/api/AABB.lua b/cocos/scripting/lua-bindings/auto/api/AABB.lua deleted file mode 100644 index 584e00f36c..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/AABB.lua +++ /dev/null @@ -1,64 +0,0 @@ - --------------------------------- --- @module AABB --- @parent_module cc - --------------------------------- --- reset min and max value. --- @function [parent=#AABB] reset --- @param self - --------------------------------- --- Sets this bounding box to the specified values. --- @function [parent=#AABB] set --- @param self --- @param #vec3_table min --- @param #vec3_table max - --------------------------------- --- Transforms the bounding box by the given transformation matrix. --- @function [parent=#AABB] transform --- @param self --- @param #mat4_table mat - --------------------------------- --- Gets the center point of the bounding box. --- @function [parent=#AABB] getCenter --- @param self --- @return vec3_table#vec3_table ret (return value: vec3_table) - --------------------------------- --- --- @function [parent=#AABB] isEmpty --- @param self --- @return bool#bool ret (return value: bool) - --------------------------------- --- --- @function [parent=#AABB] getCorners --- @param self --- @param #vec3_table dst - --------------------------------- --- update the _min and _max from the given point. --- @function [parent=#AABB] updateMinMax --- @param self --- @param #vec3_table point --- @param #long num - --------------------------------- --- check whether the point is in. --- @function [parent=#AABB] containPoint --- @param self --- @param #vec3_table point --- @return bool#bool ret (return value: bool) - --------------------------------- --- @overload self, vec3_table, vec3_table --- @overload self --- @function [parent=#AABB] AABB --- @param self --- @param #vec3_table min --- @param #vec3_table max - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/OBB.lua b/cocos/scripting/lua-bindings/auto/api/OBB.lua deleted file mode 100644 index 3346b9f5d9..0000000000 --- a/cocos/scripting/lua-bindings/auto/api/OBB.lua +++ /dev/null @@ -1,40 +0,0 @@ - --------------------------------- --- @module OBB --- @parent_module cc - --------------------------------- --- --- @function [parent=#OBB] reset --- @param self - --------------------------------- --- --- @function [parent=#OBB] set --- @param self --- @param #vec3_table center --- @param #vec3_table _xAxis --- @param #vec3_table _yAxis --- @param #vec3_table _zAxis --- @param #vec3_table _extents - --------------------------------- --- Transforms the obb by the given transformation matrix. --- @function [parent=#OBB] transform --- @param self --- @param #mat4_table mat - --------------------------------- --- --- @function [parent=#OBB] getCorners --- @param self --- @param #vec3_table verts - --------------------------------- --- --- @function [parent=#OBB] containPoint --- @param self --- @param #vec3_table point --- @return bool#bool ret (return value: bool) - -return nil diff --git a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua index f4c658eda1..df2829323b 100644 --- a/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua +++ b/cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_3d_auto_api.lua @@ -1,16 +1,6 @@ -------------------------------- -- @module cc --------------------------------------------------------- --- the cc AABB --- @field [parent=#cc] AABB#AABB AABB preloaded module - - --------------------------------------------------------- --- the cc OBB --- @field [parent=#cc] OBB#OBB OBB preloaded module - - -------------------------------------------------------- -- the cc Skeleton3D -- @field [parent=#cc] Skeleton3D#Skeleton3D Skeleton3D preloaded module 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 bc2519ac6b..43db45a304 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.cpp @@ -5,712 +5,6 @@ -int lua_cocos2dx_3d_AABB_reset(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_reset'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->reset(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:reset",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_reset'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_set(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_set'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - cocos2d::Vec3 arg0; - cocos2d::Vec3 arg1; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.AABB:set"); - - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.AABB:set"); - if(!ok) - return 0; - cobj->set(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:set",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_set'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_transform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_transform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.AABB:transform"); - if(!ok) - return 0; - cobj->transform(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:transform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_transform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_getCenter(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_getCenter'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cocos2d::Vec3 ret = cobj->getCenter(); - vec3_to_luaval(tolua_S, ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:getCenter",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_getCenter'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_isEmpty(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_isEmpty'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - bool ret = cobj->isEmpty(); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:isEmpty",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_isEmpty'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_getCorners(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_getCorners'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Vec3",&arg0); - if(!ok) - return 0; - cobj->getCorners(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:getCorners",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_getCorners'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_updateMinMax(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_updateMinMax'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 2) - { - const cocos2d::Vec3* arg0; - ssize_t arg1; - - ok &= luaval_to_object(tolua_S, 2, "cc.Vec3",&arg0); - - ok &= luaval_to_ssize(tolua_S, 3, &arg1, "cc.AABB:updateMinMax"); - if(!ok) - return 0; - cobj->updateMinMax(arg0, arg1); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:updateMinMax",argc, 2); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_updateMinMax'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_containPoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* 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.AABB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::AABB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_AABB_containPoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3 arg0; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.AABB:containPoint"); - if(!ok) - return 0; - bool ret = cobj->containPoint(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:containPoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_containPoint'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_AABB_constructor(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::AABB* cobj = nullptr; - bool ok = true; -#if COCOS2D_DEBUG >= 1 - tolua_Error tolua_err; -#endif - - argc = lua_gettop(tolua_S)-1; - do{ - if (argc == 2) { - cocos2d::Vec3 arg0; - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.AABB:AABB"); - - if (!ok) { break; } - cocos2d::Vec3 arg1; - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.AABB:AABB"); - - if (!ok) { break; } - cobj = new cocos2d::AABB(arg0, arg1); - tolua_pushusertype(tolua_S,(void*)cobj,"cc.AABB"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - return 1; - } - }while(0); - ok = true; - do{ - if (argc == 0) { - cobj = new cocos2d::AABB(); - tolua_pushusertype(tolua_S,(void*)cobj,"cc.AABB"); - tolua_register_gc(tolua_S,lua_gettop(tolua_S)); - return 1; - } - }while(0); - ok = true; - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.AABB:AABB",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_AABB_constructor'.",&tolua_err); -#endif - - return 0; -} - -static int lua_cocos2dx_3d_AABB_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (AABB)"); - return 0; -} - -int lua_register_cocos2dx_3d_AABB(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.AABB"); - tolua_cclass(tolua_S,"AABB","cc.AABB","",nullptr); - - tolua_beginmodule(tolua_S,"AABB"); - tolua_function(tolua_S,"new",lua_cocos2dx_3d_AABB_constructor); - tolua_function(tolua_S,"reset",lua_cocos2dx_3d_AABB_reset); - tolua_function(tolua_S,"set",lua_cocos2dx_3d_AABB_set); - tolua_function(tolua_S,"transform",lua_cocos2dx_3d_AABB_transform); - tolua_function(tolua_S,"getCenter",lua_cocos2dx_3d_AABB_getCenter); - tolua_function(tolua_S,"isEmpty",lua_cocos2dx_3d_AABB_isEmpty); - tolua_function(tolua_S,"getCorners",lua_cocos2dx_3d_AABB_getCorners); - tolua_function(tolua_S,"updateMinMax",lua_cocos2dx_3d_AABB_updateMinMax); - tolua_function(tolua_S,"containPoint",lua_cocos2dx_3d_AABB_containPoint); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::AABB).name(); - g_luaType[typeName] = "cc.AABB"; - g_typeCast["AABB"] = "cc.AABB"; - return 1; -} - -int lua_cocos2dx_3d_OBB_reset(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::OBB* 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.OBB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::OBB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_OBB_reset'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 0) - { - if(!ok) - return 0; - cobj->reset(); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.OBB:reset",argc, 0); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_OBB_reset'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_OBB_set(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::OBB* 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.OBB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::OBB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_OBB_set'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 5) - { - cocos2d::Vec3 arg0; - cocos2d::Vec3 arg1; - cocos2d::Vec3 arg2; - cocos2d::Vec3 arg3; - cocos2d::Vec3 arg4; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.OBB:set"); - - ok &= luaval_to_vec3(tolua_S, 3, &arg1, "cc.OBB:set"); - - ok &= luaval_to_vec3(tolua_S, 4, &arg2, "cc.OBB:set"); - - ok &= luaval_to_vec3(tolua_S, 5, &arg3, "cc.OBB:set"); - - ok &= luaval_to_vec3(tolua_S, 6, &arg4, "cc.OBB:set"); - if(!ok) - return 0; - cobj->set(arg0, arg1, arg2, arg3, arg4); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.OBB:set",argc, 5); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_OBB_set'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_OBB_transform(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::OBB* 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.OBB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::OBB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_OBB_transform'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Mat4 arg0; - - ok &= luaval_to_mat4(tolua_S, 2, &arg0, "cc.OBB:transform"); - if(!ok) - return 0; - cobj->transform(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.OBB:transform",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_OBB_transform'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_OBB_getCorners(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::OBB* 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.OBB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::OBB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_OBB_getCorners'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3* arg0; - - ok &= luaval_to_object(tolua_S, 2, "cc.Vec3",&arg0); - if(!ok) - return 0; - cobj->getCorners(arg0); - return 0; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.OBB:getCorners",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_OBB_getCorners'.",&tolua_err); -#endif - - return 0; -} -int lua_cocos2dx_3d_OBB_containPoint(lua_State* tolua_S) -{ - int argc = 0; - cocos2d::OBB* 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.OBB",0,&tolua_err)) goto tolua_lerror; -#endif - - cobj = (cocos2d::OBB*)tolua_tousertype(tolua_S,1,0); - -#if COCOS2D_DEBUG >= 1 - if (!cobj) - { - tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_OBB_containPoint'", nullptr); - return 0; - } -#endif - - argc = lua_gettop(tolua_S)-1; - if (argc == 1) - { - cocos2d::Vec3 arg0; - - ok &= luaval_to_vec3(tolua_S, 2, &arg0, "cc.OBB:containPoint"); - if(!ok) - return 0; - bool ret = cobj->containPoint(arg0); - tolua_pushboolean(tolua_S,(bool)ret); - return 1; - } - CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.OBB:containPoint",argc, 1); - return 0; - -#if COCOS2D_DEBUG >= 1 - tolua_lerror: - tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_OBB_containPoint'.",&tolua_err); -#endif - - return 0; -} -static int lua_cocos2dx_3d_OBB_finalize(lua_State* tolua_S) -{ - printf("luabindings: finalizing LUA object (OBB)"); - return 0; -} - -int lua_register_cocos2dx_3d_OBB(lua_State* tolua_S) -{ - tolua_usertype(tolua_S,"cc.OBB"); - tolua_cclass(tolua_S,"OBB","cc.OBB","",nullptr); - - tolua_beginmodule(tolua_S,"OBB"); - tolua_function(tolua_S,"reset",lua_cocos2dx_3d_OBB_reset); - tolua_function(tolua_S,"set",lua_cocos2dx_3d_OBB_set); - tolua_function(tolua_S,"transform",lua_cocos2dx_3d_OBB_transform); - tolua_function(tolua_S,"getCorners",lua_cocos2dx_3d_OBB_getCorners); - tolua_function(tolua_S,"containPoint",lua_cocos2dx_3d_OBB_containPoint); - tolua_endmodule(tolua_S); - std::string typeName = typeid(cocos2d::OBB).name(); - g_luaType[typeName] = "cc.OBB"; - g_typeCast["OBB"] = "cc.OBB"; - return 1; -} - int lua_cocos2dx_3d_Skeleton3D_getBoneByName(lua_State* tolua_S) { int argc = 0; @@ -2814,8 +2108,6 @@ TOLUA_API int register_all_cocos2dx_3d(lua_State* tolua_S) lua_register_cocos2dx_3d_Animate3D(tolua_S); lua_register_cocos2dx_3d_Sprite3D(tolua_S); lua_register_cocos2dx_3d_AttachNode(tolua_S); - lua_register_cocos2dx_3d_AABB(tolua_S); - lua_register_cocos2dx_3d_OBB(tolua_S); lua_register_cocos2dx_3d_BillBoard(tolua_S); lua_register_cocos2dx_3d_Animation3D(tolua_S); lua_register_cocos2dx_3d_Skeleton3D(tolua_S); 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 3963c71800..443f02e21d 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_3d_auto.hpp @@ -43,22 +43,6 @@ int register_all_cocos2dx_3d(lua_State* tolua_S); - - - - - - - - - - - - - - - -