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

This commit is contained in:
CocosRobot 2015-05-29 06:31:00 +00:00
parent a165790ba9
commit 3a1b52cafd
6 changed files with 171 additions and 76 deletions

View File

@ -18494,21 +18494,13 @@ mat4
}, },
/** /**
* @method initOrthographic * @method clearBackground
* @param {float} arg0 * @param {float} arg0
* @param {float} arg1
* @param {float} arg2
* @param {float} arg3
* @return {bool}
*/ */
initOrthographic : function ( clearBackground : function (
float,
float,
float,
float float
) )
{ {
return false;
}, },
/** /**
@ -18552,13 +18544,21 @@ getType : function (
}, },
/** /**
* @method clearBackground * @method initOrthographic
* @param {float} arg0 * @param {float} arg0
* @param {float} arg1
* @param {float} arg2
* @param {float} arg3
* @return {bool}
*/ */
clearBackground : function ( initOrthographic : function (
float,
float,
float,
float float
) )
{ {
return false;
}, },
/** /**
@ -18581,6 +18581,18 @@ scene
{ {
}, },
/**
* @method projectGL
* @param {vec3_object} arg0
* @return {vec2_object}
*/
projectGL : function (
vec3
)
{
return cc.Vec2;
},
/** /**
* @method getViewMatrix * @method getViewMatrix
* @return {mat4_object} * @return {mat4_object}

View File

@ -57651,32 +57651,24 @@ bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1); JS_ReportError(cx, "js_cocos2dx_Camera_getDepthInView : wrong number of arguments: %d, was expecting %d", argc, 1);
return false; return false;
} }
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true; bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj); js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initOrthographic : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_clearBackground : Invalid Native Object");
if (argc == 4) { if (argc == 1) {
double arg0; double arg0;
double arg1;
double arg2;
double arg3;
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1); JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_clearBackground : Error processing arguments");
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2); cobj->clearBackground(arg0);
ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3); args.rval().setUndefined();
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initOrthographic : Error processing arguments");
bool ret = cobj->initOrthographic(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
args.rval().set(jsret);
return true; return true;
} }
JS_ReportError(cx, "js_cocos2dx_Camera_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4); JS_ReportError(cx, "js_cocos2dx_Camera_clearBackground : wrong number of arguments: %d, was expecting %d", argc, 1);
return false; return false;
} }
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp)
@ -57753,24 +57745,32 @@ bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_Camera_getType : wrong number of arguments: %d, was expecting %d", argc, 0); JS_ReportError(cx, "js_cocos2dx_Camera_getType : wrong number of arguments: %d, was expecting %d", argc, 0);
return false; return false;
} }
bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true; bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull()); JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj); js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL); cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_clearBackground : Invalid Native Object"); JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_initOrthographic : Invalid Native Object");
if (argc == 1) { if (argc == 4) {
double arg0; double arg0;
double arg1;
double arg2;
double arg3;
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0); ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_clearBackground : Error processing arguments"); ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
cobj->clearBackground(arg0); ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
args.rval().setUndefined(); ok &= JS::ToNumber( cx, args.get(3), &arg3) && !isnan(arg3);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_initOrthographic : Error processing arguments");
bool ret = cobj->initOrthographic(arg0, arg1, arg2, arg3);
jsval jsret = JSVAL_NULL;
jsret = BOOLEAN_TO_JSVAL(ret);
args.rval().set(jsret);
return true; return true;
} }
JS_ReportError(cx, "js_cocos2dx_Camera_clearBackground : wrong number of arguments: %d, was expecting %d", argc, 1); JS_ReportError(cx, "js_cocos2dx_Camera_initOrthographic : wrong number of arguments: %d, was expecting %d", argc, 4);
return false; return false;
} }
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp)
@ -57821,6 +57821,28 @@ bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1); JS_ReportError(cx, "js_cocos2dx_Camera_setScene : wrong number of arguments: %d, was expecting %d", argc, 1);
return false; return false;
} }
bool js_cocos2dx_Camera_projectGL(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Camera* cobj = (cocos2d::Camera *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Camera_projectGL : Invalid Native Object");
if (argc == 1) {
cocos2d::Vec3 arg0;
ok &= jsval_to_vector3(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Camera_projectGL : Error processing arguments");
cocos2d::Vec2 ret = cobj->projectGL(arg0);
jsval jsret = JSVAL_NULL;
jsret = vector2_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_Camera_projectGL : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp) bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp)
{ {
JS::CallArgs args = JS::CallArgsFromVp(argc, vp); JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -58130,14 +58152,15 @@ void js_register_cocos2dx_Camera(JSContext *cx, JS::HandleObject global) {
JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("lookAt", js_cocos2dx_Camera_lookAt, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getProjectionMatrix", js_cocos2dx_Camera_getProjectionMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getDepthInView", js_cocos2dx_Camera_getDepthInView, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("clearBackground", js_cocos2dx_Camera_clearBackground, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setDepth", js_cocos2dx_Camera_setDepth, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initDefault", js_cocos2dx_Camera_initDefault, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getCameraFlag", js_cocos2dx_Camera_getCameraFlag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getCameraFlag", js_cocos2dx_Camera_getCameraFlag, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getType", js_cocos2dx_Camera_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getType", js_cocos2dx_Camera_getType, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("clearBackground", js_cocos2dx_Camera_clearBackground, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("initOrthographic", js_cocos2dx_Camera_initOrthographic, 4, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setAdditionalProjection", js_cocos2dx_Camera_setAdditionalProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setAdditionalProjection", js_cocos2dx_Camera_setAdditionalProjection, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("setScene", js_cocos2dx_Camera_setScene, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("projectGL", js_cocos2dx_Camera_projectGL, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getViewMatrix", js_cocos2dx_Camera_getViewMatrix, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getNearPlane", js_cocos2dx_Camera_getNearPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("getNearPlane", js_cocos2dx_Camera_getNearPlane, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE), JS_FN("project", js_cocos2dx_Camera_project, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),

View File

@ -3358,14 +3358,15 @@ bool js_cocos2dx_Camera_getViewProjectionMatrix(JSContext *cx, uint32_t argc, js
bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_lookAt(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getProjectionMatrix(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getDepthInView(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_setDepth(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_initDefault(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getCameraFlag(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getType(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_clearBackground(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_initOrthographic(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_setAdditionalProjection(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_setScene(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_projectGL(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getViewMatrix(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_getNearPlane(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp); bool js_cocos2dx_Camera_project(JSContext *cx, uint32_t argc, jsval *vp);

View File

@ -42,13 +42,10 @@
-------------------------------- --------------------------------
-- --
-- @function [parent=#Camera] initOrthographic -- @function [parent=#Camera] clearBackground
-- @param self -- @param self
-- @param #float zoomX -- @param #float depth
-- @param #float zoomY -- @return Camera#Camera self (return value: cc.Camera)
-- @param #float nearPlane
-- @param #float farPlane
-- @return bool#bool ret (return value: bool)
-------------------------------- --------------------------------
-- set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default -- set depth, camera with larger depth is drawn on top of camera with smaller depth, the depth of camera with CameraFlag::DEFAULT is 0, user defined camera is -1 by default
@ -78,10 +75,13 @@
-------------------------------- --------------------------------
-- --
-- @function [parent=#Camera] clearBackground -- @function [parent=#Camera] initOrthographic
-- @param self -- @param self
-- @param #float depth -- @param #float zoomX
-- @return Camera#Camera self (return value: cc.Camera) -- @param #float zoomY
-- @param #float nearPlane
-- @param #float farPlane
-- @return bool#bool ret (return value: bool)
-------------------------------- --------------------------------
-- Is this aabb visible in frustum -- Is this aabb visible in frustum
@ -104,6 +104,13 @@
-- @param #cc.Scene scene -- @param #cc.Scene scene
-- @return Camera#Camera self (return value: cc.Camera) -- @return Camera#Camera self (return value: cc.Camera)
--------------------------------
--
-- @function [parent=#Camera] projectGL
-- @param self
-- @param #vec3_table src
-- @return vec2_table#vec2_table ret (return value: vec2_table)
-------------------------------- --------------------------------
-- Gets the camera's view matrix.<br> -- Gets the camera's view matrix.<br>
-- return The camera view matrix. -- return The camera view matrix.

View File

@ -76383,7 +76383,7 @@ int lua_cocos2dx_Camera_getDepthInView(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Camera_initOrthographic(lua_State* tolua_S) int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
cocos2d::Camera* cobj = nullptr; cocos2d::Camera* cobj = nullptr;
@ -76403,41 +76403,32 @@ int lua_cocos2dx_Camera_initOrthographic(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_initOrthographic'", nullptr); tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_clearBackground'", nullptr);
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 4) if (argc == 1)
{ {
double arg0; double arg0;
double arg1;
double arg2;
double arg3;
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:initOrthographic"); ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:clearBackground");
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:initOrthographic");
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:initOrthographic");
ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:initOrthographic");
if(!ok) if(!ok)
{ {
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_initOrthographic'", nullptr); tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_clearBackground'", nullptr);
return 0; return 0;
} }
bool ret = cobj->initOrthographic(arg0, arg1, arg2, arg3); cobj->clearBackground(arg0);
tolua_pushboolean(tolua_S,(bool)ret); lua_settop(tolua_S, 1);
return 1; return 1;
} }
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:initOrthographic",argc, 4); luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:clearBackground",argc, 1);
return 0; return 0;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_lerror: tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initOrthographic'.",&tolua_err); tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_clearBackground'.",&tolua_err);
#endif #endif
return 0; return 0;
@ -76633,7 +76624,7 @@ int lua_cocos2dx_Camera_getType(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S) int lua_cocos2dx_Camera_initOrthographic(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
cocos2d::Camera* cobj = nullptr; cocos2d::Camera* cobj = nullptr;
@ -76653,32 +76644,41 @@ int lua_cocos2dx_Camera_clearBackground(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
if (!cobj) if (!cobj)
{ {
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_clearBackground'", nullptr); tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_initOrthographic'", nullptr);
return 0; return 0;
} }
#endif #endif
argc = lua_gettop(tolua_S)-1; argc = lua_gettop(tolua_S)-1;
if (argc == 1) if (argc == 4)
{ {
double arg0; double arg0;
double arg1;
double arg2;
double arg3;
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:clearBackground"); ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Camera:initOrthographic");
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Camera:initOrthographic");
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Camera:initOrthographic");
ok &= luaval_to_number(tolua_S, 5,&arg3, "cc.Camera:initOrthographic");
if(!ok) if(!ok)
{ {
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_clearBackground'", nullptr); tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_initOrthographic'", nullptr);
return 0; return 0;
} }
cobj->clearBackground(arg0); bool ret = cobj->initOrthographic(arg0, arg1, arg2, arg3);
lua_settop(tolua_S, 1); tolua_pushboolean(tolua_S,(bool)ret);
return 1; return 1;
} }
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:clearBackground",argc, 1); luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:initOrthographic",argc, 4);
return 0; return 0;
#if COCOS2D_DEBUG >= 1 #if COCOS2D_DEBUG >= 1
tolua_lerror: tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_clearBackground'.",&tolua_err); tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_initOrthographic'.",&tolua_err);
#endif #endif
return 0; return 0;
@ -76833,6 +76833,56 @@ int lua_cocos2dx_Camera_setScene(lua_State* tolua_S)
return 0; return 0;
} }
int lua_cocos2dx_Camera_projectGL(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Camera* 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.Camera",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Camera*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Camera_projectGL'", 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.Camera:projectGL");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Camera_projectGL'", nullptr);
return 0;
}
cocos2d::Vec2 ret = cobj->projectGL(arg0);
vec2_to_luaval(tolua_S, ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Camera:projectGL",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Camera_projectGL'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S) int lua_cocos2dx_Camera_getViewMatrix(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -77374,15 +77424,16 @@ int lua_register_cocos2dx_Camera(lua_State* tolua_S)
tolua_function(tolua_S,"lookAt",lua_cocos2dx_Camera_lookAt); tolua_function(tolua_S,"lookAt",lua_cocos2dx_Camera_lookAt);
tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix); tolua_function(tolua_S,"getProjectionMatrix",lua_cocos2dx_Camera_getProjectionMatrix);
tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView); tolua_function(tolua_S,"getDepthInView",lua_cocos2dx_Camera_getDepthInView);
tolua_function(tolua_S,"initOrthographic",lua_cocos2dx_Camera_initOrthographic); tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground);
tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth); tolua_function(tolua_S,"setDepth",lua_cocos2dx_Camera_setDepth);
tolua_function(tolua_S,"initDefault",lua_cocos2dx_Camera_initDefault); tolua_function(tolua_S,"initDefault",lua_cocos2dx_Camera_initDefault);
tolua_function(tolua_S,"getCameraFlag",lua_cocos2dx_Camera_getCameraFlag); tolua_function(tolua_S,"getCameraFlag",lua_cocos2dx_Camera_getCameraFlag);
tolua_function(tolua_S,"getType",lua_cocos2dx_Camera_getType); tolua_function(tolua_S,"getType",lua_cocos2dx_Camera_getType);
tolua_function(tolua_S,"clearBackground",lua_cocos2dx_Camera_clearBackground); tolua_function(tolua_S,"initOrthographic",lua_cocos2dx_Camera_initOrthographic);
tolua_function(tolua_S,"isVisibleInFrustum",lua_cocos2dx_Camera_isVisibleInFrustum); tolua_function(tolua_S,"isVisibleInFrustum",lua_cocos2dx_Camera_isVisibleInFrustum);
tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection); tolua_function(tolua_S,"setAdditionalProjection",lua_cocos2dx_Camera_setAdditionalProjection);
tolua_function(tolua_S,"setScene",lua_cocos2dx_Camera_setScene); tolua_function(tolua_S,"setScene",lua_cocos2dx_Camera_setScene);
tolua_function(tolua_S,"projectGL",lua_cocos2dx_Camera_projectGL);
tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix); tolua_function(tolua_S,"getViewMatrix",lua_cocos2dx_Camera_getViewMatrix);
tolua_function(tolua_S,"getNearPlane",lua_cocos2dx_Camera_getNearPlane); tolua_function(tolua_S,"getNearPlane",lua_cocos2dx_Camera_getNearPlane);
tolua_function(tolua_S,"project",lua_cocos2dx_Camera_project); tolua_function(tolua_S,"project",lua_cocos2dx_Camera_project);

View File

@ -2045,6 +2045,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
#endif // __cocos2dx_h__ #endif // __cocos2dx_h__