diff --git a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js index 538b9c109a..bbf1ae86cf 100644 --- a/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js +++ b/cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_physics3d_auto_api.js @@ -926,6 +926,14 @@ collisionChecking : function ( { }, +/** + * @method setGhostPairCallback + */ +setGhostPairCallback : function ( +) +{ +}, + /** * @method init * @param {cc.Physics3DWorldDes} arg0 diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp index 2b275169b2..9e9f147e76 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.cpp @@ -2,7 +2,7 @@ #if CC_USE_3D_PHYSICS && CC_ENABLE_BULLET_INTEGRATION #include "cocos2d_specifics.hpp" #include "CCPhysics3D.h" -#include "3d/jsb_cocos2dx_3d_conversions.h" +#include "physics3d/jsb_cocos2dx_physics3d_manual.h" template static bool dummy_constructor(JSContext *cx, uint32_t argc, jsval *vp) { @@ -2356,6 +2356,22 @@ bool js_cocos2dx_physics3d_Physics3DWorld_collisionChecking(JSContext *cx, uint3 JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_collisionChecking : wrong number of arguments: %d, was expecting %d", argc, 0); return false; } +bool js_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback(JSContext *cx, uint32_t argc, jsval *vp) +{ + JS::CallArgs args = JS::CallArgsFromVp(argc, vp); + JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); + js_proxy_t *proxy = jsb_get_js_proxy(obj); + cocos2d::Physics3DWorld* cobj = (cocos2d::Physics3DWorld *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback : Invalid Native Object"); + if (argc == 0) { + cobj->setGhostPairCallback(); + args.rval().setUndefined(); + return true; + } + + JS_ReportError(cx, "js_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback : wrong number of arguments: %d, was expecting %d", argc, 0); + return false; +} bool js_cocos2dx_physics3d_Physics3DWorld_init(JSContext *cx, uint32_t argc, jsval *vp) { JS::CallArgs args = JS::CallArgsFromVp(argc, vp); @@ -2783,6 +2799,7 @@ void js_register_cocos2dx_physics3d_Physics3DWorld(JSContext *cx, JS::HandleObje JS_FN("stepSimulate", js_cocos2dx_physics3d_Physics3DWorld_stepSimulate, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("needCollisionChecking", js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("collisionChecking", js_cocos2dx_physics3d_Physics3DWorld_collisionChecking, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), + JS_FN("setGhostPairCallback", js_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("init", js_cocos2dx_physics3d_Physics3DWorld_init, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("removeAllPhysics3DObjects", js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("isDebugDrawEnabled", js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), diff --git a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp index b9dc40c2b0..8df678a7ce 100644 --- a/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp +++ b/cocos/scripting/js-bindings/auto/jsb_cocos2dx_physics3d_auto.hpp @@ -139,6 +139,7 @@ bool js_cocos2dx_physics3d_Physics3DWorld_setGravity(JSContext *cx, uint32_t arg bool js_cocos2dx_physics3d_Physics3DWorld_stepSimulate(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_physics3d_Physics3DWorld_collisionChecking(JSContext *cx, uint32_t argc, jsval *vp); +bool js_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_physics3d_Physics3DWorld_init(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled(JSContext *cx, uint32_t argc, jsval *vp); diff --git a/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua b/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua index 7aff8dadb5..409fb695cc 100644 --- a/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua +++ b/cocos/scripting/lua-bindings/auto/api/Physics3DWorld.lua @@ -30,6 +30,12 @@ -- @param self -- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) +-------------------------------- +-- +-- @function [parent=#Physics3DWorld] setGhostPairCallback +-- @param self +-- @return Physics3DWorld#Physics3DWorld self (return value: cc.Physics3DWorld) + -------------------------------- -- Remove all Physics3DObjects. -- @function [parent=#Physics3DWorld] removeAllPhysics3DObjects diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp index 13cfd603f1..e1b4b7a9c0 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.cpp @@ -4171,6 +4171,53 @@ int lua_cocos2dx_physics3d_Physics3DWorld_collisionChecking(lua_State* tolua_S) return 0; } +int lua_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback(lua_State* tolua_S) +{ + int argc = 0; + cocos2d::Physics3DWorld* 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.Physics3DWorld",0,&tolua_err)) goto tolua_lerror; +#endif + + cobj = (cocos2d::Physics3DWorld*)tolua_tousertype(tolua_S,1,0); + +#if COCOS2D_DEBUG >= 1 + if (!cobj) + { + tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback'", 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_Physics3DWorld_setGhostPairCallback'", nullptr); + return 0; + } + cobj->setGhostPairCallback(); + lua_settop(tolua_S, 1); + return 1; + } + luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Physics3DWorld:setGhostPairCallback",argc, 0); + return 0; + +#if COCOS2D_DEBUG >= 1 + tolua_lerror: + tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback'.",&tolua_err); +#endif + + return 0; +} int lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects(lua_State* tolua_S) { int argc = 0; @@ -4730,6 +4777,7 @@ int lua_register_cocos2dx_physics3d_Physics3DWorld(lua_State* tolua_S) tolua_function(tolua_S,"stepSimulate",lua_cocos2dx_physics3d_Physics3DWorld_stepSimulate); tolua_function(tolua_S,"needCollisionChecking",lua_cocos2dx_physics3d_Physics3DWorld_needCollisionChecking); tolua_function(tolua_S,"collisionChecking",lua_cocos2dx_physics3d_Physics3DWorld_collisionChecking); + tolua_function(tolua_S,"setGhostPairCallback",lua_cocos2dx_physics3d_Physics3DWorld_setGhostPairCallback); tolua_function(tolua_S,"removeAllPhysics3DObjects",lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DObjects); tolua_function(tolua_S,"isDebugDrawEnabled",lua_cocos2dx_physics3d_Physics3DWorld_isDebugDrawEnabled); tolua_function(tolua_S,"removeAllPhysics3DConstraints",lua_cocos2dx_physics3d_Physics3DWorld_removeAllPhysics3DConstraints); diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp index 3f8b86b17b..b0e6a8427e 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics3d_auto.hpp @@ -257,6 +257,7 @@ int register_all_cocos2dx_physics3d(lua_State* tolua_S); + #endif // __cocos2dx_physics3d_h__