[ci skip][AUTO]: updating luabinding & jsbinding automatically

This commit is contained in:
CocosRobot 2015-07-20 07:08:12 +00:00
parent 1afc0c1e48
commit 0a23e4a305
4 changed files with 140 additions and 72 deletions

View File

@ -1010,9 +1010,11 @@ getRotation3D : function (
/** /**
* @method getNodeToParentAffineTransform * @method getNodeToParentAffineTransform
* @return {cc.AffineTransform} * @param {cc.Node} node
* @return {cc.AffineTransform|cc.AffineTransform}
*/ */
getNodeToParentAffineTransform : function( getNodeToParentAffineTransform : function(
node
) )
{ {
return cc.AffineTransform; return cc.AffineTransform;
@ -1172,9 +1174,11 @@ getChildrenCount : function (
/** /**
* @method getNodeToParentTransform * @method getNodeToParentTransform
* @return {mat4_object} * @param {cc.Node} node
* @return {mat4_object|mat4_object}
*/ */
getNodeToParentTransform : function( getNodeToParentTransform : function(
node
) )
{ {
return cc.Mat4; return cc.Mat4;

View File

@ -2645,10 +2645,36 @@ bool js_cocos2dx_Node_getRotation3D(JSContext *cx, uint32_t argc, jsval *vp)
bool js_cocos2dx_Node_getNodeToParentAffineTransform(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Node_getNodeToParentAffineTransform(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); bool ok = true;
JS::RootedObject obj(cx);
cocos2d::Node* cobj = NULL;
obj = args.thisv().toObjectOrNull();
js_proxy_t *proxy = jsb_get_js_proxy(obj); js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentAffineTransform : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentAffineTransform : Invalid Native Object");
do {
if (argc == 1) {
cocos2d::Node* arg0;
do {
if (args.get(0).isNull()) { arg0 = nullptr; break; }
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(0).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
if (!ok) { ok = true; break; }
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(arg0);
jsval jsret = JSVAL_NULL;
jsret = ccaffinetransform_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
} while(0);
do {
if (argc == 0) { if (argc == 0) {
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform();
jsval jsret = JSVAL_NULL; jsval jsret = JSVAL_NULL;
@ -2656,8 +2682,9 @@ bool js_cocos2dx_Node_getNodeToParentAffineTransform(JSContext *cx, uint32_t arg
args.rval().set(jsret); args.rval().set(jsret);
return true; return true;
} }
} while(0);
JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentAffineTransform : wrong number of arguments: %d, was expecting %d", argc, 0); JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentAffineTransform : wrong number of arguments");
return false; return false;
} }
bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Node_convertTouchToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp)
@ -2974,10 +3001,36 @@ bool js_cocos2dx_Node_getChildrenCount(JSContext *cx, uint32_t argc, jsval *vp)
bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); bool ok = true;
JS::RootedObject obj(cx);
cocos2d::Node* cobj = NULL;
obj = args.thisv().toObjectOrNull();
js_proxy_t *proxy = jsb_get_js_proxy(obj); js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL); cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentTransform : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentTransform : Invalid Native Object");
do {
if (argc == 1) {
cocos2d::Node* arg0;
do {
if (args.get(0).isNull()) { arg0 = nullptr; break; }
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JSObject *tmpObj = args.get(0).toObjectOrNull();
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Node*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
if (!ok) { ok = true; break; }
cocos2d::Mat4 ret = cobj->getNodeToParentTransform(arg0);
jsval jsret = JSVAL_NULL;
jsret = matrix_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
} while(0);
do {
if (argc == 0) { if (argc == 0) {
const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); const cocos2d::Mat4& ret = cobj->getNodeToParentTransform();
jsval jsret = JSVAL_NULL; jsval jsret = JSVAL_NULL;
@ -2985,8 +3038,9 @@ bool js_cocos2dx_Node_getNodeToParentTransform(JSContext *cx, uint32_t argc, jsv
args.rval().set(jsret); args.rval().set(jsret);
return true; return true;
} }
} while(0);
JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentTransform : wrong number of arguments: %d, was expecting %d", argc, 0); JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentTransform : wrong number of arguments");
return false; return false;
} }
bool js_cocos2dx_Node_convertToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Node_convertToNodeSpaceAR(JSContext *cx, uint32_t argc, jsval *vp)

View File

@ -345,9 +345,11 @@
-- @return Node#Node self (return value: cc.Node) -- @return Node#Node self (return value: cc.Node)
-------------------------------- --------------------------------
-- -- @overload self, cc.Node
-- @overload self
-- @function [parent=#Node] getNodeToParentAffineTransform -- @function [parent=#Node] getNodeToParentAffineTransform
-- @param self -- @param self
-- @param #cc.Node ancestor
-- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform) -- @return AffineTransform#AffineTransform ret (return value: cc.AffineTransform)
-------------------------------- --------------------------------
@ -388,11 +390,11 @@
-- @return vec3_table#vec3_table ret (return value: vec3_table) -- @return vec3_table#vec3_table ret (return value: vec3_table)
-------------------------------- --------------------------------
-- Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.<br> -- @overload self, cc.Node
-- The matrix is in Pixels.<br> -- @overload self
-- return The transformation matrix.
-- @function [parent=#Node] getNodeToParentTransform -- @function [parent=#Node] getNodeToParentTransform
-- @param self -- @param self
-- @param #cc.Node ancestor
-- @return mat4_table#mat4_table ret (return value: mat4_table) -- @return mat4_table#mat4_table ret (return value: mat4_table)
-------------------------------- --------------------------------

View File

@ -4891,18 +4891,14 @@ int lua_cocos2dx_Node_getNodeToParentAffineTransform(lua_State* tolua_S)
int argc = 0; int argc = 0;
cocos2d::Node* cobj = nullptr; cocos2d::Node* cobj = nullptr;
bool ok = true; bool ok = true;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_Error tolua_err; tolua_Error tolua_err;
#endif #endif
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror;
#endif #endif
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
@ -4910,19 +4906,27 @@ int lua_cocos2dx_Node_getNodeToParentAffineTransform(lua_State* tolua_S)
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 0) do{
{ if (argc == 1) {
if(!ok) cocos2d::Node* arg0;
{ ok &= luaval_to_object<cocos2d::Node>(tolua_S, 2, "cc.Node",&arg0, "cc.Node:getNodeToParentAffineTransform");
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'", nullptr);
return 0; if (!ok) { break; }
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(arg0);
affinetransform_to_luaval(tolua_S, ret);
return 1;
} }
}while(0);
ok = true;
do{
if (argc == 0) {
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform();
affinetransform_to_luaval(tolua_S, ret); affinetransform_to_luaval(tolua_S, ret);
return 1; return 1;
} }
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0); luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0);
return 0; return 0;
@ -5176,18 +5180,14 @@ int lua_cocos2dx_Node_getNodeToParentTransform(lua_State* tolua_S)
int argc = 0; int argc = 0;
cocos2d::Node* cobj = nullptr; cocos2d::Node* cobj = nullptr;
bool ok = true; bool ok = true;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_Error tolua_err; tolua_Error tolua_err;
#endif #endif
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror; if (!tolua_isusertype(tolua_S,1,"cc.Node",0,&tolua_err)) goto tolua_lerror;
#endif #endif
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0); cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
@ -5195,19 +5195,27 @@ int lua_cocos2dx_Node_getNodeToParentTransform(lua_State* tolua_S)
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 0) do{
{ if (argc == 1) {
if(!ok) cocos2d::Node* arg0;
{ ok &= luaval_to_object<cocos2d::Node>(tolua_S, 2, "cc.Node",&arg0, "cc.Node:getNodeToParentTransform");
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_getNodeToParentTransform'", nullptr);
return 0; if (!ok) { break; }
cocos2d::Mat4 ret = cobj->getNodeToParentTransform(arg0);
mat4_to_luaval(tolua_S, ret);
return 1;
} }
}while(0);
ok = true;
do{
if (argc == 0) {
const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); const cocos2d::Mat4& ret = cobj->getNodeToParentTransform();
mat4_to_luaval(tolua_S, ret); mat4_to_luaval(tolua_S, ret);
return 1; return 1;
} }
}while(0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0); luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0);
return 0; return 0;