@@ -2087,7 +2087,7 @@ int lua_cocos2dx_3d_Mesh_getMeshVertexAttribute(lua_State* tolua_S)
2087
2087
2088
2088
return 0 ;
2089
2089
}
2090
- int lua_cocos2dx_3d_Mesh_setVertexLayout (lua_State* tolua_S)
2090
+ int lua_cocos2dx_3d_Mesh_calculateAABB (lua_State* tolua_S)
2091
2091
{
2092
2092
int argc = 0 ;
2093
2093
cocos2d::Mesh* cobj = nullptr ;
@@ -2107,32 +2107,29 @@ int lua_cocos2dx_3d_Mesh_setVertexLayout(lua_State* tolua_S)
2107
2107
#if COCOS2D_DEBUG >= 1
2108
2108
if (!cobj)
2109
2109
{
2110
- tolua_error (tolua_S," invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_setVertexLayout '" , nullptr );
2110
+ tolua_error (tolua_S," invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_calculateAABB '" , nullptr );
2111
2111
return 0 ;
2112
2112
}
2113
2113
#endif
2114
2114
2115
2115
argc = lua_gettop (tolua_S)-1 ;
2116
- if (argc == 1 )
2116
+ if (argc == 0 )
2117
2117
{
2118
- const cocos2d::backend::VertexLayout* arg0;
2119
-
2120
- ok &= luaval_to_object<const cocos2d::backend::VertexLayout>(tolua_S, 2 , " ccb.VertexLayout" ,&arg0, " cc.Mesh:setVertexLayout" );
2121
2118
if (!ok)
2122
2119
{
2123
- tolua_error (tolua_S," invalid arguments in function 'lua_cocos2dx_3d_Mesh_setVertexLayout '" , nullptr );
2120
+ tolua_error (tolua_S," invalid arguments in function 'lua_cocos2dx_3d_Mesh_calculateAABB '" , nullptr );
2124
2121
return 0 ;
2125
2122
}
2126
- cobj->setVertexLayout (arg0 );
2123
+ cobj->calculateAABB ( );
2127
2124
lua_settop (tolua_S, 1 );
2128
2125
return 1 ;
2129
2126
}
2130
- luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d \n " , " cc.Mesh:setVertexLayout " ,argc, 1 );
2127
+ luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d \n " , " cc.Mesh:calculateAABB " ,argc, 0 );
2131
2128
return 0 ;
2132
2129
2133
2130
#if COCOS2D_DEBUG >= 1
2134
2131
tolua_lerror:
2135
- tolua_error (tolua_S," #ferror in function 'lua_cocos2dx_3d_Mesh_setVertexLayout '." ,&tolua_err);
2132
+ tolua_error (tolua_S," #ferror in function 'lua_cocos2dx_3d_Mesh_calculateAABB '." ,&tolua_err);
2136
2133
#endif
2137
2134
2138
2135
return 0 ;
@@ -2352,53 +2349,6 @@ int lua_cocos2dx_3d_Mesh_setMeshIndexData(lua_State* tolua_S)
2352
2349
2353
2350
return 0 ;
2354
2351
}
2355
- int lua_cocos2dx_3d_Mesh_calculateAABB (lua_State* tolua_S)
2356
- {
2357
- int argc = 0 ;
2358
- cocos2d::Mesh* cobj = nullptr ;
2359
- bool ok = true ;
2360
-
2361
- #if COCOS2D_DEBUG >= 1
2362
- tolua_Error tolua_err;
2363
- #endif
2364
-
2365
-
2366
- #if COCOS2D_DEBUG >= 1
2367
- if (!tolua_isusertype (tolua_S,1 ," cc.Mesh" ,0 ,&tolua_err)) goto tolua_lerror;
2368
- #endif
2369
-
2370
- cobj = (cocos2d::Mesh*)tolua_tousertype (tolua_S,1 ,0 );
2371
-
2372
- #if COCOS2D_DEBUG >= 1
2373
- if (!cobj)
2374
- {
2375
- tolua_error (tolua_S," invalid 'cobj' in function 'lua_cocos2dx_3d_Mesh_calculateAABB'" , nullptr );
2376
- return 0 ;
2377
- }
2378
- #endif
2379
-
2380
- argc = lua_gettop (tolua_S)-1 ;
2381
- if (argc == 0 )
2382
- {
2383
- if (!ok)
2384
- {
2385
- tolua_error (tolua_S," invalid arguments in function 'lua_cocos2dx_3d_Mesh_calculateAABB'" , nullptr );
2386
- return 0 ;
2387
- }
2388
- cobj->calculateAABB ();
2389
- lua_settop (tolua_S, 1 );
2390
- return 1 ;
2391
- }
2392
- luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d \n " , " cc.Mesh:calculateAABB" ,argc, 0 );
2393
- return 0 ;
2394
-
2395
- #if COCOS2D_DEBUG >= 1
2396
- tolua_lerror:
2397
- tolua_error (tolua_S," #ferror in function 'lua_cocos2dx_3d_Mesh_calculateAABB'." ,&tolua_err);
2398
- #endif
2399
-
2400
- return 0 ;
2401
- }
2402
2352
int lua_cocos2dx_3d_Mesh_getProgramState (lua_State* tolua_S)
2403
2353
{
2404
2354
int argc = 0 ;
@@ -2796,12 +2746,11 @@ int lua_register_cocos2dx_3d_Mesh(lua_State* tolua_S)
2796
2746
tolua_function (tolua_S," setMaterial" ,lua_cocos2dx_3d_Mesh_setMaterial);
2797
2747
tolua_function (tolua_S," getName" ,lua_cocos2dx_3d_Mesh_getName);
2798
2748
tolua_function (tolua_S," getMeshVertexAttribute" ,lua_cocos2dx_3d_Mesh_getMeshVertexAttribute);
2799
- tolua_function (tolua_S," setVertexLayout " ,lua_cocos2dx_3d_Mesh_setVertexLayout );
2749
+ tolua_function (tolua_S," calculateAABB " ,lua_cocos2dx_3d_Mesh_calculateAABB );
2800
2750
tolua_function (tolua_S," draw" ,lua_cocos2dx_3d_Mesh_draw);
2801
2751
tolua_function (tolua_S," getBlendFunc" ,lua_cocos2dx_3d_Mesh_getBlendFunc);
2802
2752
tolua_function (tolua_S," setName" ,lua_cocos2dx_3d_Mesh_setName);
2803
2753
tolua_function (tolua_S," setMeshIndexData" ,lua_cocos2dx_3d_Mesh_setMeshIndexData);
2804
- tolua_function (tolua_S," calculateAABB" ,lua_cocos2dx_3d_Mesh_calculateAABB);
2805
2754
tolua_function (tolua_S," getProgramState" ,lua_cocos2dx_3d_Mesh_getProgramState);
2806
2755
tolua_function (tolua_S," getMeshVertexAttribCount" ,lua_cocos2dx_3d_Mesh_getMeshVertexAttribCount);
2807
2756
tolua_function (tolua_S," setBlendFunc" ,lua_cocos2dx_3d_Mesh_setBlendFunc);
@@ -4102,56 +4051,6 @@ int lua_cocos2dx_3d_Sprite3D_getMeshCount(lua_State* tolua_S)
4102
4051
4103
4052
return 0 ;
4104
4053
}
4105
- int lua_cocos2dx_3d_Sprite3D_setVertexLayout (lua_State* tolua_S)
4106
- {
4107
- int argc = 0 ;
4108
- cocos2d::Sprite3D* cobj = nullptr ;
4109
- bool ok = true ;
4110
-
4111
- #if COCOS2D_DEBUG >= 1
4112
- tolua_Error tolua_err;
4113
- #endif
4114
-
4115
-
4116
- #if COCOS2D_DEBUG >= 1
4117
- if (!tolua_isusertype (tolua_S,1 ," cc.Sprite3D" ,0 ,&tolua_err)) goto tolua_lerror;
4118
- #endif
4119
-
4120
- cobj = (cocos2d::Sprite3D*)tolua_tousertype (tolua_S,1 ,0 );
4121
-
4122
- #if COCOS2D_DEBUG >= 1
4123
- if (!cobj)
4124
- {
4125
- tolua_error (tolua_S," invalid 'cobj' in function 'lua_cocos2dx_3d_Sprite3D_setVertexLayout'" , nullptr );
4126
- return 0 ;
4127
- }
4128
- #endif
4129
-
4130
- argc = lua_gettop (tolua_S)-1 ;
4131
- if (argc == 1 )
4132
- {
4133
- const cocos2d::backend::VertexLayout* arg0;
4134
-
4135
- ok &= luaval_to_object<const cocos2d::backend::VertexLayout>(tolua_S, 2 , " ccb.VertexLayout" ,&arg0, " cc.Sprite3D:setVertexLayout" );
4136
- if (!ok)
4137
- {
4138
- tolua_error (tolua_S," invalid arguments in function 'lua_cocos2dx_3d_Sprite3D_setVertexLayout'" , nullptr );
4139
- return 0 ;
4140
- }
4141
- cobj->setVertexLayout (arg0);
4142
- lua_settop (tolua_S, 1 );
4143
- return 1 ;
4144
- }
4145
- luaL_error (tolua_S, " %s has wrong number of arguments: %d, was expecting %d \n " , " cc.Sprite3D:setVertexLayout" ,argc, 1 );
4146
- return 0 ;
4147
-
4148
- #if COCOS2D_DEBUG >= 1
4149
- tolua_lerror:
4150
- tolua_error (tolua_S," #ferror in function 'lua_cocos2dx_3d_Sprite3D_setVertexLayout'." ,&tolua_err);
4151
- #endif
4152
-
4153
- return 0 ;
4154
- }
4155
4054
int lua_cocos2dx_3d_Sprite3D_getMeshByIndex (lua_State* tolua_S)
4156
4055
{
4157
4056
int argc = 0 ;
@@ -4837,7 +4736,6 @@ int lua_register_cocos2dx_3d_Sprite3D(lua_State* tolua_S)
4837
4736
tolua_function (tolua_S," setMaterial" ,lua_cocos2dx_3d_Sprite3D_setMaterial);
4838
4737
tolua_function (tolua_S," getMesh" ,lua_cocos2dx_3d_Sprite3D_getMesh);
4839
4738
tolua_function (tolua_S," getMeshCount" ,lua_cocos2dx_3d_Sprite3D_getMeshCount);
4840
- tolua_function (tolua_S," setVertexLayout" ,lua_cocos2dx_3d_Sprite3D_setVertexLayout);
4841
4739
tolua_function (tolua_S," getMeshByIndex" ,lua_cocos2dx_3d_Sprite3D_getMeshByIndex);
4842
4740
tolua_function (tolua_S," isForceDepthWrite" ,lua_cocos2dx_3d_Sprite3D_isForceDepthWrite);
4843
4741
tolua_function (tolua_S," getBlendFunc" ,lua_cocos2dx_3d_Sprite3D_getBlendFunc);
0 commit comments