[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,19 +2645,46 @@ 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_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentAffineTransform : Invalid Native Object");
if (argc == 0) {
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform();
jsval jsret = JSVAL_NULL;
jsret = ccaffinetransform_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentAffineTransform : wrong number of arguments: %d, was expecting %d", argc, 0); JS::RootedObject obj(cx);
cocos2d::Node* cobj = NULL;
obj = args.thisv().toObjectOrNull();
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
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) {
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform();
jsval jsret = JSVAL_NULL;
jsret = ccaffinetransform_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
} while(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,19 +3001,46 @@ 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_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getNodeToParentTransform : Invalid Native Object");
if (argc == 0) {
const cocos2d::Mat4& ret = cobj->getNodeToParentTransform();
jsval jsret = JSVAL_NULL;
jsret = matrix_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_Node_getNodeToParentTransform : wrong number of arguments: %d, was expecting %d", argc, 0); JS::RootedObject obj(cx);
cocos2d::Node* cobj = NULL;
obj = args.thisv().toObjectOrNull();
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
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) {
const cocos2d::Mat4& ret = cobj->getNodeToParentTransform();
jsval jsret = JSVAL_NULL;
jsret = matrix_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
} while(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,11 +345,13 @@
-- @return Node#Node self (return value: cc.Node) -- @return Node#Node self (return value: cc.Node)
-------------------------------- --------------------------------
-- -- @overload self, cc.Node
-- @function [parent=#Node] getNodeToParentAffineTransform -- @overload self
-- @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)
-------------------------------- --------------------------------
-- --
-- @function [parent=#Node] isCascadeOpacityEnabled -- @function [parent=#Node] isCascadeOpacityEnabled
@ -388,13 +390,13 @@
-- @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)
-------------------------------- --------------------------------
-- converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative).<br> -- converts a Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative).<br>
-- param touch A given touch.<br> -- param touch A given touch.<br>

View File

@ -4891,39 +4891,43 @@ 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)
{ {
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'", nullptr); tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentAffineTransform'", nullptr);
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;
} }
cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform(); }while(0);
affinetransform_to_luaval(tolua_S, ret); ok = true;
return 1; do{
} if (argc == 0) {
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentAffineTransform",argc, 0); cocos2d::AffineTransform ret = cobj->getNodeToParentAffineTransform();
affinetransform_to_luaval(tolua_S, ret);
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);
return 0; return 0;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
@ -5176,39 +5180,43 @@ 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)
{ {
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentTransform'", nullptr); tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getNodeToParentTransform'", nullptr);
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;
} }
const cocos2d::Mat4& ret = cobj->getNodeToParentTransform(); }while(0);
mat4_to_luaval(tolua_S, ret); ok = true;
return 1; do{
} if (argc == 0) {
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getNodeToParentTransform",argc, 0); const cocos2d::Mat4& ret = cobj->getNodeToParentTransform();
mat4_to_luaval(tolua_S, ret);
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);
return 0; return 0;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1