mirror of https://github.com/axmolengine/axmol.git
[AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
parent
aaa3526ee2
commit
b5e9986d17
|
@ -1296,15 +1296,65 @@ char
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method getIntersectionPoint
|
* @method setMaxDetailMapAmount
|
||||||
* @param {cc.Ray} arg0
|
* @param {int} arg0
|
||||||
* @return {vec3_object}
|
|
||||||
*/
|
*/
|
||||||
getIntersectionPoint : function (
|
setMaxDetailMapAmount : function (
|
||||||
ray
|
int
|
||||||
|
)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method setDrawWire
|
||||||
|
* @param {bool} arg0
|
||||||
|
*/
|
||||||
|
setDrawWire : function (
|
||||||
|
bool
|
||||||
|
)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method setIsEnableFrustumCull
|
||||||
|
* @param {bool} arg0
|
||||||
|
*/
|
||||||
|
setIsEnableFrustumCull : function (
|
||||||
|
bool
|
||||||
|
)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method getHeightData
|
||||||
|
* @return {Array}
|
||||||
|
*/
|
||||||
|
getHeightData : function (
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return new Array();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method setDetailMap
|
||||||
|
* @param {unsigned int} arg0
|
||||||
|
* @param {cc.Terrain::DetailMap} arg1
|
||||||
|
*/
|
||||||
|
setDetailMap : function (
|
||||||
|
int,
|
||||||
|
map
|
||||||
|
)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method resetHeightMap
|
||||||
|
* @param {char} arg0
|
||||||
|
*/
|
||||||
|
resetHeightMap : function (
|
||||||
|
char
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return cc.Vec3;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1339,22 +1389,6 @@ vec2
|
||||||
return cc.Vec2;
|
return cc.Vec2;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* @method getHeight
|
|
||||||
* @param {vec2_object|float} vec2
|
|
||||||
* @param {vec3_object|float} vec3
|
|
||||||
* @param {vec3_object} vec3
|
|
||||||
* @return {float|float}
|
|
||||||
*/
|
|
||||||
getHeight : function(
|
|
||||||
float,
|
|
||||||
float,
|
|
||||||
vec3
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method initTextures
|
* @method initTextures
|
||||||
* @return {bool}
|
* @return {bool}
|
||||||
|
@ -1376,68 +1410,16 @@ initProperties : function (
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method getNormal
|
* @method getHeight
|
||||||
* @param {int} arg0
|
* @param {vec2_object|float} vec2
|
||||||
* @param {int} arg1
|
* @param {vec3_object|float} vec3
|
||||||
* @return {vec3_object}
|
* @param {vec3_object} vec3
|
||||||
*/
|
* @return {float|float}
|
||||||
getNormal : function (
|
*/
|
||||||
int,
|
getHeight : function(
|
||||||
int
|
float,
|
||||||
)
|
float,
|
||||||
{
|
vec3
|
||||||
return cc.Vec3;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @method setDrawWire
|
|
||||||
* @param {bool} arg0
|
|
||||||
*/
|
|
||||||
setDrawWire : function (
|
|
||||||
bool
|
|
||||||
)
|
|
||||||
{
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @method reload
|
|
||||||
*/
|
|
||||||
reload : function (
|
|
||||||
)
|
|
||||||
{
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @method setDetailMap
|
|
||||||
* @param {unsigned int} arg0
|
|
||||||
* @param {cc.Terrain::DetailMap} arg1
|
|
||||||
*/
|
|
||||||
setDetailMap : function (
|
|
||||||
int,
|
|
||||||
map
|
|
||||||
)
|
|
||||||
{
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @method getImageHeight
|
|
||||||
* @param {int} arg0
|
|
||||||
* @param {int} arg1
|
|
||||||
* @return {float}
|
|
||||||
*/
|
|
||||||
getImageHeight : function (
|
|
||||||
int,
|
|
||||||
int
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @method getMinHeight
|
|
||||||
* @return {float}
|
|
||||||
*/
|
|
||||||
getMinHeight : function (
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1458,13 +1440,61 @@ float
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method resetHeightMap
|
* @method getTerrainSize
|
||||||
* @param {char} arg0
|
* @return {size_object}
|
||||||
*/
|
*/
|
||||||
resetHeightMap : function (
|
getTerrainSize : function (
|
||||||
char
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
return cc.Size;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method getIntersectionPoint
|
||||||
|
* @param {cc.Ray} arg0
|
||||||
|
* @return {vec3_object}
|
||||||
|
*/
|
||||||
|
getIntersectionPoint : function (
|
||||||
|
ray
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return cc.Vec3;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method getNormal
|
||||||
|
* @param {int} arg0
|
||||||
|
* @param {int} arg1
|
||||||
|
* @return {vec3_object}
|
||||||
|
*/
|
||||||
|
getNormal : function (
|
||||||
|
int,
|
||||||
|
int
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return cc.Vec3;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method reload
|
||||||
|
*/
|
||||||
|
reload : function (
|
||||||
|
)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method getImageHeight
|
||||||
|
* @param {int} arg0
|
||||||
|
* @param {int} arg1
|
||||||
|
* @return {float}
|
||||||
|
*/
|
||||||
|
getImageHeight : function (
|
||||||
|
int,
|
||||||
|
int
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1478,23 +1508,13 @@ getMaxHeight : function (
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method setMaxDetailMapAmount
|
* @method getMinHeight
|
||||||
* @param {int} arg0
|
* @return {float}
|
||||||
*/
|
*/
|
||||||
setMaxDetailMapAmount : function (
|
getMinHeight : function (
|
||||||
int
|
|
||||||
)
|
|
||||||
{
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @method setIsEnableFrustumCull
|
|
||||||
* @param {bool} arg0
|
|
||||||
*/
|
|
||||||
setIsEnableFrustumCull : function (
|
|
||||||
bool
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -4431,6 +4431,26 @@ getInstance : function (
|
||||||
*/
|
*/
|
||||||
cc.Scene = {
|
cc.Scene = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method setPhysics3DDebugCamera
|
||||||
|
* @param {cc.Camera} arg0
|
||||||
|
*/
|
||||||
|
setPhysics3DDebugCamera : function (
|
||||||
|
camera
|
||||||
|
)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method getPhysics3DWorld
|
||||||
|
* @return {cc.Physics3DWorld}
|
||||||
|
*/
|
||||||
|
getPhysics3DWorld : function (
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return cc.Physics3DWorld;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method setCameraOrderDirty
|
* @method setCameraOrderDirty
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3767,26 +3767,132 @@ bool js_cocos2dx_3d_Terrain_initHeightMap(JSContext *cx, uint32_t argc, jsval *v
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
cocos2d::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Invalid Native Object");
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : Invalid Native Object");
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
cocos2d::Ray arg0;
|
int arg0;
|
||||||
ok &= jsval_to_ray(cx, args.get(0), &arg0);
|
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Error processing arguments");
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : Error processing arguments");
|
||||||
cocos2d::Vec3 ret = cobj->getIntersectionPoint(arg0);
|
cobj->setMaxDetailMapAmount(arg0);
|
||||||
|
args.rval().setUndefined();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_setDrawWire(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Invalid Native Object");
|
||||||
|
if (argc == 1) {
|
||||||
|
bool arg0;
|
||||||
|
arg0 = JS::ToBoolean(args.get(0));
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Error processing arguments");
|
||||||
|
cobj->setDrawWire(arg0);
|
||||||
|
args.rval().setUndefined();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDrawWire : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Invalid Native Object");
|
||||||
|
if (argc == 1) {
|
||||||
|
bool arg0;
|
||||||
|
arg0 = JS::ToBoolean(args.get(0));
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Error processing arguments");
|
||||||
|
cobj->setIsEnableFrustumCull(arg0);
|
||||||
|
args.rval().setUndefined();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_getHeightData(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getHeightData : Invalid Native Object");
|
||||||
|
if (argc == 0) {
|
||||||
|
std::vector<float, std::allocator<float> > ret = cobj->getHeightData();
|
||||||
jsval jsret = JSVAL_NULL;
|
jsval jsret = JSVAL_NULL;
|
||||||
jsret = vector3_to_jsval(cx, ret);
|
do {
|
||||||
|
if (ret) {
|
||||||
|
js_proxy_t *jsProxy = js_get_or_create_proxy<std::vector<float, std::allocator<float> >>(cx, (std::vector<float, std::allocator<float> >)ret);
|
||||||
|
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||||
|
} else {
|
||||||
|
jsret = JSVAL_NULL;
|
||||||
|
}
|
||||||
|
} while (0);
|
||||||
args.rval().set(jsret);
|
args.rval().set(jsret);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getIntersectionPoint : wrong number of arguments: %d, was expecting %d", argc, 1);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getHeightData : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_setDetailMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Invalid Native Object");
|
||||||
|
if (argc == 2) {
|
||||||
|
unsigned int arg0;
|
||||||
|
cocos2d::Terrain::DetailMap arg1;
|
||||||
|
ok &= jsval_to_uint32(cx, args.get(0), &arg0);
|
||||||
|
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
||||||
|
ok = false;
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Error processing arguments");
|
||||||
|
cobj->setDetailMap(arg0, arg1);
|
||||||
|
args.rval().setUndefined();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDetailMap : wrong number of arguments: %d, was expecting %d", argc, 2);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_resetHeightMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Invalid Native Object");
|
||||||
|
if (argc == 1) {
|
||||||
|
const char* arg0;
|
||||||
|
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Error processing arguments");
|
||||||
|
cobj->resetHeightMap(arg0);
|
||||||
|
args.rval().setUndefined();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_resetHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
|
@ -3858,6 +3964,42 @@ bool js_cocos2dx_3d_Terrain_convertToTerrainSpace(JSContext *cx, uint32_t argc,
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_convertToTerrainSpace : wrong number of arguments: %d, was expecting %d", argc, 1);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_convertToTerrainSpace : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_initTextures(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initTextures : Invalid Native Object");
|
||||||
|
if (argc == 0) {
|
||||||
|
bool ret = cobj->initTextures();
|
||||||
|
jsval jsret = JSVAL_NULL;
|
||||||
|
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||||
|
args.rval().set(jsret);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initTextures : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_initProperties(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initProperties : Invalid Native Object");
|
||||||
|
if (argc == 0) {
|
||||||
|
bool ret = cobj->initProperties();
|
||||||
|
jsval jsret = JSVAL_NULL;
|
||||||
|
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||||
|
args.rval().set(jsret);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initProperties : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
@ -3950,40 +4092,68 @@ bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getHeight : wrong number of arguments");
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getHeight : wrong number of arguments");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_initTextures(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_setLODDistance(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
cocos2d::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initTextures : Invalid Native Object");
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setLODDistance : Invalid Native Object");
|
||||||
if (argc == 0) {
|
if (argc == 3) {
|
||||||
bool ret = cobj->initTextures();
|
double arg0;
|
||||||
jsval jsret = JSVAL_NULL;
|
double arg1;
|
||||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
double arg2;
|
||||||
args.rval().set(jsret);
|
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
||||||
|
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
||||||
|
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setLODDistance : Error processing arguments");
|
||||||
|
cobj->setLODDistance(arg0, arg1, arg2);
|
||||||
|
args.rval().setUndefined();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initTextures : wrong number of arguments: %d, was expecting %d", argc, 0);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setLODDistance : wrong number of arguments: %d, was expecting %d", argc, 3);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_initProperties(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_getTerrainSize(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());
|
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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
cocos2d::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_initProperties : Invalid Native Object");
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getTerrainSize : Invalid Native Object");
|
||||||
if (argc == 0) {
|
if (argc == 0) {
|
||||||
bool ret = cobj->initProperties();
|
cocos2d::Size ret = cobj->getTerrainSize();
|
||||||
jsval jsret = JSVAL_NULL;
|
jsval jsret = JSVAL_NULL;
|
||||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
jsret = ccsize_to_jsval(cx, ret);
|
||||||
args.rval().set(jsret);
|
args.rval().set(jsret);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_initProperties : wrong number of arguments: %d, was expecting %d", argc, 0);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getTerrainSize : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_3d_Terrain_getIntersectionPoint(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Invalid Native Object");
|
||||||
|
if (argc == 1) {
|
||||||
|
cocos2d::Ray arg0;
|
||||||
|
ok &= jsval_to_ray(cx, args.get(0), &arg0);
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_getIntersectionPoint : Error processing arguments");
|
||||||
|
cocos2d::Vec3 ret = cobj->getIntersectionPoint(arg0);
|
||||||
|
jsval jsret = JSVAL_NULL;
|
||||||
|
jsret = vector3_to_jsval(cx, ret);
|
||||||
|
args.rval().set(jsret);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getIntersectionPoint : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
|
@ -4010,26 +4180,6 @@ bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getNormal : wrong number of arguments: %d, was expecting %d", argc, 2);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getNormal : wrong number of arguments: %d, was expecting %d", argc, 2);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_setDrawWire(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Invalid Native Object");
|
|
||||||
if (argc == 1) {
|
|
||||||
bool arg0;
|
|
||||||
arg0 = JS::ToBoolean(args.get(0));
|
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDrawWire : Error processing arguments");
|
|
||||||
cobj->setDrawWire(arg0);
|
|
||||||
args.rval().setUndefined();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDrawWire : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
@ -4046,29 +4196,6 @@ bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_reload : wrong number of arguments: %d, was expecting %d", argc, 0);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_reload : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_setDetailMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Invalid Native Object");
|
|
||||||
if (argc == 2) {
|
|
||||||
unsigned int arg0;
|
|
||||||
cocos2d::Terrain::DetailMap arg1;
|
|
||||||
ok &= jsval_to_uint32(cx, args.get(0), &arg0);
|
|
||||||
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
|
||||||
ok = false;
|
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setDetailMap : Error processing arguments");
|
|
||||||
cobj->setDetailMap(arg0, arg1);
|
|
||||||
args.rval().setUndefined();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setDetailMap : wrong number of arguments: %d, was expecting %d", argc, 2);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
@ -4093,68 +4220,6 @@ bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getImageHeight : wrong number of arguments: %d, was expecting %d", argc, 2);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getImageHeight : wrong number of arguments: %d, was expecting %d", argc, 2);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_getMinHeight(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getMinHeight : Invalid Native Object");
|
|
||||||
if (argc == 0) {
|
|
||||||
double ret = cobj->getMinHeight();
|
|
||||||
jsval jsret = JSVAL_NULL;
|
|
||||||
jsret = DOUBLE_TO_JSVAL(ret);
|
|
||||||
args.rval().set(jsret);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMinHeight : wrong number of arguments: %d, was expecting %d", argc, 0);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool js_cocos2dx_3d_Terrain_setLODDistance(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setLODDistance : Invalid Native Object");
|
|
||||||
if (argc == 3) {
|
|
||||||
double arg0;
|
|
||||||
double arg1;
|
|
||||||
double arg2;
|
|
||||||
ok &= JS::ToNumber( cx, args.get(0), &arg0) && !isnan(arg0);
|
|
||||||
ok &= JS::ToNumber( cx, args.get(1), &arg1) && !isnan(arg1);
|
|
||||||
ok &= JS::ToNumber( cx, args.get(2), &arg2) && !isnan(arg2);
|
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setLODDistance : Error processing arguments");
|
|
||||||
cobj->setLODDistance(arg0, arg1, arg2);
|
|
||||||
args.rval().setUndefined();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setLODDistance : wrong number of arguments: %d, was expecting %d", argc, 3);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool js_cocos2dx_3d_Terrain_resetHeightMap(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Invalid Native Object");
|
|
||||||
if (argc == 1) {
|
|
||||||
const char* arg0;
|
|
||||||
std::string arg0_tmp; ok &= jsval_to_std_string(cx, args.get(0), &arg0_tmp); arg0 = arg0_tmp.c_str();
|
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_resetHeightMap : Error processing arguments");
|
|
||||||
cobj->resetHeightMap(arg0);
|
|
||||||
args.rval().setUndefined();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_resetHeightMap : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
@ -4173,44 +4238,22 @@ bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMaxHeight : wrong number of arguments: %d, was expecting %d", argc, 0);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMaxHeight : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_3d_Terrain_getMinHeight(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
cocos2d::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : Invalid Native Object");
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_getMinHeight : Invalid Native Object");
|
||||||
if (argc == 1) {
|
if (argc == 0) {
|
||||||
int arg0;
|
double ret = cobj->getMinHeight();
|
||||||
ok &= jsval_to_int32(cx, args.get(0), (int32_t *)&arg0);
|
jsval jsret = JSVAL_NULL;
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : Error processing arguments");
|
jsret = DOUBLE_TO_JSVAL(ret);
|
||||||
cobj->setMaxDetailMapAmount(arg0);
|
args.rval().set(jsret);
|
||||||
args.rval().setUndefined();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setMaxDetailMapAmount : wrong number of arguments: %d, was expecting %d", argc, 1);
|
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_getMinHeight : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(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::Terrain* cobj = (cocos2d::Terrain *)(proxy ? proxy->ptr : NULL);
|
|
||||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Invalid Native Object");
|
|
||||||
if (argc == 1) {
|
|
||||||
bool arg0;
|
|
||||||
arg0 = JS::ToBoolean(args.get(0));
|
|
||||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : Error processing arguments");
|
|
||||||
cobj->setIsEnableFrustumCull(arg0);
|
|
||||||
args.rval().setUndefined();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_ReportError(cx, "js_cocos2dx_3d_Terrain_setIsEnableFrustumCull : wrong number of arguments: %d, was expecting %d", argc, 1);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4240,24 +4283,26 @@ void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global) {
|
||||||
|
|
||||||
static JSFunctionSpec funcs[] = {
|
static JSFunctionSpec funcs[] = {
|
||||||
JS_FN("initHeightMap", js_cocos2dx_3d_Terrain_initHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("initHeightMap", js_cocos2dx_3d_Terrain_initHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("getIntersectionPoint", js_cocos2dx_3d_Terrain_getIntersectionPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setMaxDetailMapAmount", js_cocos2dx_3d_Terrain_setMaxDetailMapAmount, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("setDrawWire", js_cocos2dx_3d_Terrain_setDrawWire, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("setIsEnableFrustumCull", js_cocos2dx_3d_Terrain_setIsEnableFrustumCull, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("getHeightData", js_cocos2dx_3d_Terrain_getHeightData, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("setDetailMap", js_cocos2dx_3d_Terrain_setDetailMap, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("resetHeightMap", js_cocos2dx_3d_Terrain_resetHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setAlphaMap", js_cocos2dx_3d_Terrain_setAlphaMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setAlphaMap", js_cocos2dx_3d_Terrain_setAlphaMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setSkirtHeightRatio", js_cocos2dx_3d_Terrain_setSkirtHeightRatio, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setSkirtHeightRatio", js_cocos2dx_3d_Terrain_setSkirtHeightRatio, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("convertToTerrainSpace", js_cocos2dx_3d_Terrain_convertToTerrainSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("convertToTerrainSpace", js_cocos2dx_3d_Terrain_convertToTerrainSpace, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("getHeight", js_cocos2dx_3d_Terrain_getHeight, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FN("initTextures", js_cocos2dx_3d_Terrain_initTextures, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("initTextures", js_cocos2dx_3d_Terrain_initTextures, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("initProperties", js_cocos2dx_3d_Terrain_initProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("initProperties", js_cocos2dx_3d_Terrain_initProperties, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("getNormal", js_cocos2dx_3d_Terrain_getNormal, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("getHeight", js_cocos2dx_3d_Terrain_getHeight, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setDrawWire", js_cocos2dx_3d_Terrain_setDrawWire, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FN("reload", js_cocos2dx_3d_Terrain_reload, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FN("setDetailMap", js_cocos2dx_3d_Terrain_setDetailMap, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FN("getImageHeight", js_cocos2dx_3d_Terrain_getImageHeight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FN("getMinHeight", js_cocos2dx_3d_Terrain_getMinHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FN("setLODDistance", js_cocos2dx_3d_Terrain_setLODDistance, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setLODDistance", js_cocos2dx_3d_Terrain_setLODDistance, 3, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("resetHeightMap", js_cocos2dx_3d_Terrain_resetHeightMap, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("getTerrainSize", js_cocos2dx_3d_Terrain_getTerrainSize, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("getIntersectionPoint", js_cocos2dx_3d_Terrain_getIntersectionPoint, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("getNormal", js_cocos2dx_3d_Terrain_getNormal, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("reload", js_cocos2dx_3d_Terrain_reload, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("getImageHeight", js_cocos2dx_3d_Terrain_getImageHeight, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("getMaxHeight", js_cocos2dx_3d_Terrain_getMaxHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("getMaxHeight", js_cocos2dx_3d_Terrain_getMaxHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setMaxDetailMapAmount", js_cocos2dx_3d_Terrain_setMaxDetailMapAmount, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("getMinHeight", js_cocos2dx_3d_Terrain_getMinHeight, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setIsEnableFrustumCull", js_cocos2dx_3d_Terrain_setIsEnableFrustumCull, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
|
||||||
JS_FS_END
|
JS_FS_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -202,23 +202,25 @@ void js_cocos2dx_3d_Terrain_finalize(JSContext *cx, JSObject *obj);
|
||||||
void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global);
|
void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global);
|
||||||
void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj);
|
void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj);
|
||||||
bool js_cocos2dx_3d_Terrain_initHeightMap(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_initHeightMap(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_setDrawWire(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_getHeightData(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_setDetailMap(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_resetHeightMap(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_setAlphaMap(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_setSkirtHeightRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_setSkirtHeightRatio(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_convertToTerrainSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_convertToTerrainSpace(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
bool js_cocos2dx_3d_Terrain_initTextures(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_initTextures(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_initProperties(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_initProperties(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_getHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_setDrawWire(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
bool js_cocos2dx_3d_Terrain_setDetailMap(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
bool js_cocos2dx_3d_Terrain_getMinHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
bool js_cocos2dx_3d_Terrain_setLODDistance(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_setLODDistance(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_resetHeightMap(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_getTerrainSize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_getIntersectionPoint(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_getNormal(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_reload(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_3d_Terrain_getImageHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_setMaxDetailMapAmount(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_3d_Terrain_getMinHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_3d_Terrain_setIsEnableFrustumCull(JSContext *cx, uint32_t argc, jsval *vp);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -13148,6 +13148,58 @@ void js_register_cocos2dx_Configuration(JSContext *cx, JS::HandleObject global)
|
||||||
JSClass *jsb_cocos2d_Scene_class;
|
JSClass *jsb_cocos2d_Scene_class;
|
||||||
JSObject *jsb_cocos2d_Scene_prototype;
|
JSObject *jsb_cocos2d_Scene_prototype;
|
||||||
|
|
||||||
|
bool js_cocos2dx_Scene_setPhysics3DDebugCamera(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::Scene* cobj = (cocos2d::Scene *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scene_setPhysics3DDebugCamera : Invalid Native Object");
|
||||||
|
if (argc == 1) {
|
||||||
|
cocos2d::Camera* arg0;
|
||||||
|
do {
|
||||||
|
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::Camera*)(jsProxy ? jsProxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||||
|
} while (0);
|
||||||
|
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Scene_setPhysics3DDebugCamera : Error processing arguments");
|
||||||
|
cobj->setPhysics3DDebugCamera(arg0);
|
||||||
|
args.rval().setUndefined();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_Scene_setPhysics3DDebugCamera : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool js_cocos2dx_Scene_getPhysics3DWorld(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::Scene* cobj = (cocos2d::Scene *)(proxy ? proxy->ptr : NULL);
|
||||||
|
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scene_getPhysics3DWorld : Invalid Native Object");
|
||||||
|
if (argc == 0) {
|
||||||
|
cocos2d::Physics3DWorld* ret = cobj->getPhysics3DWorld();
|
||||||
|
jsval jsret = JSVAL_NULL;
|
||||||
|
do {
|
||||||
|
if (ret) {
|
||||||
|
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Physics3DWorld>(cx, (cocos2d::Physics3DWorld*)ret);
|
||||||
|
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||||
|
} else {
|
||||||
|
jsret = JSVAL_NULL;
|
||||||
|
}
|
||||||
|
} while (0);
|
||||||
|
args.rval().set(jsret);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_ReportError(cx, "js_cocos2dx_Scene_getPhysics3DWorld : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *vp)
|
bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *vp)
|
||||||
{
|
{
|
||||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||||
|
@ -13382,6 +13434,8 @@ void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global) {
|
||||||
};
|
};
|
||||||
|
|
||||||
static JSFunctionSpec funcs[] = {
|
static JSFunctionSpec funcs[] = {
|
||||||
|
JS_FN("setPhysics3DDebugCamera", js_cocos2dx_Scene_setPhysics3DDebugCamera, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
JS_FN("getPhysics3DWorld", js_cocos2dx_Scene_getPhysics3DWorld, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("setCameraOrderDirty", js_cocos2dx_Scene_setCameraOrderDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("setCameraOrderDirty", js_cocos2dx_Scene_setCameraOrderDirty, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("render", js_cocos2dx_Scene_render, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("render", js_cocos2dx_Scene_render, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
JS_FN("onProjectionChanged", js_cocos2dx_Scene_onProjectionChanged, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
JS_FN("onProjectionChanged", js_cocos2dx_Scene_onProjectionChanged, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||||
|
|
|
@ -725,6 +725,8 @@ bool js_cocos2dx_Scene_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
void js_cocos2dx_Scene_finalize(JSContext *cx, JSObject *obj);
|
void js_cocos2dx_Scene_finalize(JSContext *cx, JSObject *obj);
|
||||||
void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global);
|
void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global);
|
||||||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||||
|
bool js_cocos2dx_Scene_setPhysics3DDebugCamera(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
bool js_cocos2dx_Scene_getPhysics3DWorld(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_Scene_render(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_Scene_render(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval *vp);
|
bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval *vp);
|
||||||
|
|
|
@ -11,6 +11,44 @@
|
||||||
-- @param #char heightMap
|
-- @param #char heightMap
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- set the MaxDetailAmount.
|
||||||
|
-- @function [parent=#Terrain] setMaxDetailMapAmount
|
||||||
|
-- @param self
|
||||||
|
-- @param #int maxValue
|
||||||
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- show the wireline instead of the surface,Debug Use only.<br>
|
||||||
|
-- Note only support desktop platform
|
||||||
|
-- @function [parent=#Terrain] setDrawWire
|
||||||
|
-- @param self
|
||||||
|
-- @param #bool boolValue
|
||||||
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- Switch frustum Culling Flag<br>
|
||||||
|
-- Note frustum culling will remarkable improve your terrain rendering performance.
|
||||||
|
-- @function [parent=#Terrain] setIsEnableFrustumCull
|
||||||
|
-- @param self
|
||||||
|
-- @param #bool boolValue
|
||||||
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- set the Detail Map
|
||||||
|
-- @function [parent=#Terrain] setDetailMap
|
||||||
|
-- @param self
|
||||||
|
-- @param #unsigned int index
|
||||||
|
-- @param #cc.Terrain::DetailMap detailMap
|
||||||
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- reset the heightmap data.
|
||||||
|
-- @function [parent=#Terrain] resetHeightMap
|
||||||
|
-- @param self
|
||||||
|
-- @param #char heightMap
|
||||||
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- set the alpha map
|
-- set the alpha map
|
||||||
-- @function [parent=#Terrain] setAlphaMap
|
-- @function [parent=#Terrain] setAlphaMap
|
||||||
|
@ -44,6 +82,22 @@
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return bool#bool ret (return value: bool)
|
-- @return bool#bool ret (return value: bool)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- Set threshold distance of each LOD level,must equal or gereater than the chunk size<br>
|
||||||
|
-- Note when invoke initHeightMap, the LOD distance will be automatic calculated.
|
||||||
|
-- @function [parent=#Terrain] setLODDistance
|
||||||
|
-- @param self
|
||||||
|
-- @param #float lod1
|
||||||
|
-- @param #float lod2
|
||||||
|
-- @param #float lod3
|
||||||
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
-- get the terrain's size
|
||||||
|
-- @function [parent=#Terrain] getTerrainSize
|
||||||
|
-- @param self
|
||||||
|
-- @return size_table#size_table ret (return value: size_table)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- get the normal of the specified pistion in terrain<br>
|
-- get the normal of the specified pistion in terrain<br>
|
||||||
-- return the normal vector of the specified position of the terrain.<br>
|
-- return the normal vector of the specified position of the terrain.<br>
|
||||||
|
@ -54,28 +108,12 @@
|
||||||
-- @param #int pixelY
|
-- @param #int pixelY
|
||||||
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
-- @return vec3_table#vec3_table ret (return value: vec3_table)
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- show the wireline instead of the surface,Debug Use only.<br>
|
|
||||||
-- Note only support desktop platform
|
|
||||||
-- @function [parent=#Terrain] setDrawWire
|
|
||||||
-- @param self
|
|
||||||
-- @param #bool boolValue
|
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
--
|
||||||
-- @function [parent=#Terrain] reload
|
-- @function [parent=#Terrain] reload
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- set the Detail Map
|
|
||||||
-- @function [parent=#Terrain] setDetailMap
|
|
||||||
-- @param self
|
|
||||||
-- @param #unsigned int index
|
|
||||||
-- @param #cc.Terrain::DetailMap detailMap
|
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- get height from the raw height filed
|
-- get height from the raw height filed
|
||||||
-- @function [parent=#Terrain] getImageHeight
|
-- @function [parent=#Terrain] getImageHeight
|
||||||
|
@ -84,29 +122,6 @@
|
||||||
-- @param #int pixelY
|
-- @param #int pixelY
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- get the terrain's mininal height.
|
|
||||||
-- @function [parent=#Terrain] getMinHeight
|
|
||||||
-- @param self
|
|
||||||
-- @return float#float ret (return value: float)
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- Set threshold distance of each LOD level,must equal or gereater than the chunk size<br>
|
|
||||||
-- Note when invoke initHeightMap, the LOD distance will be automatic calculated.
|
|
||||||
-- @function [parent=#Terrain] setLODDistance
|
|
||||||
-- @param self
|
|
||||||
-- @param #float lod1
|
|
||||||
-- @param #float lod2
|
|
||||||
-- @param #float lod3
|
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- reset the heightmap data.
|
|
||||||
-- @function [parent=#Terrain] resetHeightMap
|
|
||||||
-- @param self
|
|
||||||
-- @param #char heightMap
|
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- get the terrain's maximum height.
|
-- get the terrain's maximum height.
|
||||||
-- @function [parent=#Terrain] getMaxHeight
|
-- @function [parent=#Terrain] getMaxHeight
|
||||||
|
@ -114,19 +129,10 @@
|
||||||
-- @return float#float ret (return value: float)
|
-- @return float#float ret (return value: float)
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
-- set the MaxDetailAmount.
|
-- get the terrain's mininal height.
|
||||||
-- @function [parent=#Terrain] setMaxDetailMapAmount
|
-- @function [parent=#Terrain] getMinHeight
|
||||||
-- @param self
|
-- @param self
|
||||||
-- @param #int maxValue
|
-- @return float#float ret (return value: float)
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
|
||||||
|
|
||||||
--------------------------------
|
|
||||||
-- Switch frustum Culling Flag<br>
|
|
||||||
-- Note frustum culling will remarkable improve your terrain rendering performance.
|
|
||||||
-- @function [parent=#Terrain] setIsEnableFrustumCull
|
|
||||||
-- @param self
|
|
||||||
-- @param #bool boolValue
|
|
||||||
-- @return Terrain#Terrain self (return value: cc.Terrain)
|
|
||||||
|
|
||||||
--------------------------------
|
--------------------------------
|
||||||
--
|
--
|
||||||
|
|
|
@ -4728,6 +4728,260 @@ int lua_cocos2dx_3d_Terrain_initHeightMap(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
int arg0;
|
||||||
|
|
||||||
|
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount");
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cobj->setMaxDetailMapAmount(arg0);
|
||||||
|
lua_settop(tolua_S, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
bool arg0;
|
||||||
|
|
||||||
|
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire");
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cobj->setDrawWire(arg0);
|
||||||
|
lua_settop(tolua_S, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
bool arg0;
|
||||||
|
|
||||||
|
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull");
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cobj->setIsEnableFrustumCull(arg0);
|
||||||
|
lua_settop(tolua_S, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 2)
|
||||||
|
{
|
||||||
|
unsigned int arg0;
|
||||||
|
cocos2d::Terrain::DetailMap arg1;
|
||||||
|
|
||||||
|
ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap");
|
||||||
|
|
||||||
|
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
||||||
|
ok = false;
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cobj->setDetailMap(arg0, arg1);
|
||||||
|
lua_settop(tolua_S, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
const char* arg0;
|
||||||
|
|
||||||
|
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str();
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cobj->resetHeightMap(arg0);
|
||||||
|
lua_settop(tolua_S, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S)
|
int lua_cocos2dx_3d_Terrain_setAlphaMap(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -4972,6 +5226,109 @@ int lua_cocos2dx_3d_Terrain_initProperties(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
argc = lua_gettop(tolua_S)-1;
|
||||||
|
if (argc == 3)
|
||||||
|
{
|
||||||
|
double arg0;
|
||||||
|
double arg1;
|
||||||
|
double arg2;
|
||||||
|
|
||||||
|
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance");
|
||||||
|
|
||||||
|
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance");
|
||||||
|
|
||||||
|
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance");
|
||||||
|
if(!ok)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cobj->setLODDistance(arg0, arg1, arg2);
|
||||||
|
lua_settop(tolua_S, 1);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int lua_cocos2dx_3d_Terrain_getTerrainSize(lua_State* tolua_S)
|
||||||
|
{
|
||||||
|
int argc = 0;
|
||||||
|
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
if (!cobj)
|
||||||
|
{
|
||||||
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getTerrainSize'", 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_3d_Terrain_getTerrainSize'", nullptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
cocos2d::Size ret = cobj->getTerrainSize();
|
||||||
|
size_to_luaval(tolua_S, ret);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getTerrainSize",argc, 0);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
#if COCOS2D_DEBUG >= 1
|
||||||
|
tolua_lerror:
|
||||||
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getTerrainSize'.",&tolua_err);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S)
|
int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -5025,56 +5382,6 @@ int lua_cocos2dx_3d_Terrain_getNormal(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int lua_cocos2dx_3d_Terrain_setDrawWire(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
int argc = 0;
|
|
||||||
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
if (!cobj)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
argc = lua_gettop(tolua_S)-1;
|
|
||||||
if (argc == 1)
|
|
||||||
{
|
|
||||||
bool arg0;
|
|
||||||
|
|
||||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setDrawWire");
|
|
||||||
if(!ok)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDrawWire'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cobj->setDrawWire(arg0);
|
|
||||||
lua_settop(tolua_S, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDrawWire",argc, 1);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDrawWire'.",&tolua_err);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S)
|
int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -5122,60 +5429,6 @@ int lua_cocos2dx_3d_Terrain_reload(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int lua_cocos2dx_3d_Terrain_setDetailMap(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
int argc = 0;
|
|
||||||
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
if (!cobj)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
argc = lua_gettop(tolua_S)-1;
|
|
||||||
if (argc == 2)
|
|
||||||
{
|
|
||||||
unsigned int arg0;
|
|
||||||
cocos2d::Terrain::DetailMap arg1;
|
|
||||||
|
|
||||||
ok &= luaval_to_uint32(tolua_S, 2,&arg0, "cc.Terrain:setDetailMap");
|
|
||||||
|
|
||||||
#pragma warning NO CONVERSION TO NATIVE FOR DetailMap
|
|
||||||
ok = false;
|
|
||||||
if(!ok)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setDetailMap'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cobj->setDetailMap(arg0, arg1);
|
|
||||||
lua_settop(tolua_S, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setDetailMap",argc, 2);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setDetailMap'.",&tolua_err);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S)
|
int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -5229,159 +5482,6 @@ int lua_cocos2dx_3d_Terrain_getImageHeight(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
int argc = 0;
|
|
||||||
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
if (!cobj)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", 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_3d_Terrain_getMinHeight'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
double ret = cobj->getMinHeight();
|
|
||||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMinHeight",argc, 0);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMinHeight'.",&tolua_err);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lua_cocos2dx_3d_Terrain_setLODDistance(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
int argc = 0;
|
|
||||||
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
if (!cobj)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
argc = lua_gettop(tolua_S)-1;
|
|
||||||
if (argc == 3)
|
|
||||||
{
|
|
||||||
double arg0;
|
|
||||||
double arg1;
|
|
||||||
double arg2;
|
|
||||||
|
|
||||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.Terrain:setLODDistance");
|
|
||||||
|
|
||||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.Terrain:setLODDistance");
|
|
||||||
|
|
||||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.Terrain:setLODDistance");
|
|
||||||
if(!ok)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setLODDistance'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cobj->setLODDistance(arg0, arg1, arg2);
|
|
||||||
lua_settop(tolua_S, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setLODDistance",argc, 3);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setLODDistance'.",&tolua_err);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lua_cocos2dx_3d_Terrain_resetHeightMap(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
int argc = 0;
|
|
||||||
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
if (!cobj)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
argc = lua_gettop(tolua_S)-1;
|
|
||||||
if (argc == 1)
|
|
||||||
{
|
|
||||||
const char* arg0;
|
|
||||||
|
|
||||||
std::string arg0_tmp; ok &= luaval_to_std_string(tolua_S, 2, &arg0_tmp, "cc.Terrain:resetHeightMap"); arg0 = arg0_tmp.c_str();
|
|
||||||
if(!ok)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cobj->resetHeightMap(arg0);
|
|
||||||
lua_settop(tolua_S, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:resetHeightMap",argc, 1);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_resetHeightMap'.",&tolua_err);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S)
|
int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
|
@ -5429,7 +5529,7 @@ int lua_cocos2dx_3d_Terrain_getMaxHeight(lua_State* tolua_S)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(lua_State* tolua_S)
|
int lua_cocos2dx_3d_Terrain_getMinHeight(lua_State* tolua_S)
|
||||||
{
|
{
|
||||||
int argc = 0;
|
int argc = 0;
|
||||||
cocos2d::Terrain* cobj = nullptr;
|
cocos2d::Terrain* cobj = nullptr;
|
||||||
|
@ -5449,82 +5549,29 @@ int lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount(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_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
argc = lua_gettop(tolua_S)-1;
|
argc = lua_gettop(tolua_S)-1;
|
||||||
if (argc == 1)
|
if (argc == 0)
|
||||||
{
|
{
|
||||||
int arg0;
|
|
||||||
|
|
||||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.Terrain:setMaxDetailMapAmount");
|
|
||||||
if(!ok)
|
if(!ok)
|
||||||
{
|
{
|
||||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount'", nullptr);
|
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_getMinHeight'", nullptr);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cobj->setMaxDetailMapAmount(arg0);
|
double ret = cobj->getMinHeight();
|
||||||
lua_settop(tolua_S, 1);
|
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setMaxDetailMapAmount",argc, 1);
|
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:getMinHeight",argc, 0);
|
||||||
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_3d_Terrain_setMaxDetailMapAmount'.",&tolua_err);
|
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_getMinHeight'.",&tolua_err);
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
int lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull(lua_State* tolua_S)
|
|
||||||
{
|
|
||||||
int argc = 0;
|
|
||||||
cocos2d::Terrain* 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.Terrain",0,&tolua_err)) goto tolua_lerror;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cobj = (cocos2d::Terrain*)tolua_tousertype(tolua_S,1,0);
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
if (!cobj)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
argc = lua_gettop(tolua_S)-1;
|
|
||||||
if (argc == 1)
|
|
||||||
{
|
|
||||||
bool arg0;
|
|
||||||
|
|
||||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Terrain:setIsEnableFrustumCull");
|
|
||||||
if(!ok)
|
|
||||||
{
|
|
||||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'", nullptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cobj->setIsEnableFrustumCull(arg0);
|
|
||||||
lua_settop(tolua_S, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Terrain:setIsEnableFrustumCull",argc, 1);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
#if COCOS2D_DEBUG >= 1
|
|
||||||
tolua_lerror:
|
|
||||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull'.",&tolua_err);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5542,22 +5589,23 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S)
|
||||||
|
|
||||||
tolua_beginmodule(tolua_S,"Terrain");
|
tolua_beginmodule(tolua_S,"Terrain");
|
||||||
tolua_function(tolua_S,"initHeightMap",lua_cocos2dx_3d_Terrain_initHeightMap);
|
tolua_function(tolua_S,"initHeightMap",lua_cocos2dx_3d_Terrain_initHeightMap);
|
||||||
|
tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount);
|
||||||
|
tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire);
|
||||||
|
tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull);
|
||||||
|
tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap);
|
||||||
|
tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap);
|
||||||
tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap);
|
tolua_function(tolua_S,"setAlphaMap",lua_cocos2dx_3d_Terrain_setAlphaMap);
|
||||||
tolua_function(tolua_S,"setSkirtHeightRatio",lua_cocos2dx_3d_Terrain_setSkirtHeightRatio);
|
tolua_function(tolua_S,"setSkirtHeightRatio",lua_cocos2dx_3d_Terrain_setSkirtHeightRatio);
|
||||||
tolua_function(tolua_S,"convertToTerrainSpace",lua_cocos2dx_3d_Terrain_convertToTerrainSpace);
|
tolua_function(tolua_S,"convertToTerrainSpace",lua_cocos2dx_3d_Terrain_convertToTerrainSpace);
|
||||||
tolua_function(tolua_S,"initTextures",lua_cocos2dx_3d_Terrain_initTextures);
|
tolua_function(tolua_S,"initTextures",lua_cocos2dx_3d_Terrain_initTextures);
|
||||||
tolua_function(tolua_S,"initProperties",lua_cocos2dx_3d_Terrain_initProperties);
|
tolua_function(tolua_S,"initProperties",lua_cocos2dx_3d_Terrain_initProperties);
|
||||||
tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal);
|
|
||||||
tolua_function(tolua_S,"setDrawWire",lua_cocos2dx_3d_Terrain_setDrawWire);
|
|
||||||
tolua_function(tolua_S,"reload",lua_cocos2dx_3d_Terrain_reload);
|
|
||||||
tolua_function(tolua_S,"setDetailMap",lua_cocos2dx_3d_Terrain_setDetailMap);
|
|
||||||
tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight);
|
|
||||||
tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight);
|
|
||||||
tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance);
|
tolua_function(tolua_S,"setLODDistance",lua_cocos2dx_3d_Terrain_setLODDistance);
|
||||||
tolua_function(tolua_S,"resetHeightMap",lua_cocos2dx_3d_Terrain_resetHeightMap);
|
tolua_function(tolua_S,"getTerrainSize",lua_cocos2dx_3d_Terrain_getTerrainSize);
|
||||||
|
tolua_function(tolua_S,"getNormal",lua_cocos2dx_3d_Terrain_getNormal);
|
||||||
|
tolua_function(tolua_S,"reload",lua_cocos2dx_3d_Terrain_reload);
|
||||||
|
tolua_function(tolua_S,"getImageHeight",lua_cocos2dx_3d_Terrain_getImageHeight);
|
||||||
tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight);
|
tolua_function(tolua_S,"getMaxHeight",lua_cocos2dx_3d_Terrain_getMaxHeight);
|
||||||
tolua_function(tolua_S,"setMaxDetailMapAmount",lua_cocos2dx_3d_Terrain_setMaxDetailMapAmount);
|
tolua_function(tolua_S,"getMinHeight",lua_cocos2dx_3d_Terrain_getMinHeight);
|
||||||
tolua_function(tolua_S,"setIsEnableFrustumCull",lua_cocos2dx_3d_Terrain_setIsEnableFrustumCull);
|
|
||||||
tolua_endmodule(tolua_S);
|
tolua_endmodule(tolua_S);
|
||||||
std::string typeName = typeid(cocos2d::Terrain).name();
|
std::string typeName = typeid(cocos2d::Terrain).name();
|
||||||
g_luaType[typeName] = "cc.Terrain";
|
g_luaType[typeName] = "cc.Terrain";
|
||||||
|
|
|
@ -128,6 +128,7 @@ int register_all_cocos2dx_3d(lua_State* tolua_S);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // __cocos2dx_3d_h__
|
#endif // __cocos2dx_3d_h__
|
||||||
|
|
Loading…
Reference in New Issue