Merge pull request #12380 from CocosRobot/update_lua_bindings_1434512493

[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
子龙山人 2015-06-17 11:58:13 +08:00
commit 2eafe82570
9 changed files with 3036 additions and 82 deletions

View File

@ -63,17 +63,6 @@
-- @param #cc.Bundle3D bundle -- @param #cc.Bundle3D bundle
-- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D) -- @return Bundle3D#Bundle3D self (return value: cc.Bundle3D)
--------------------------------
--
-- @function [parent=#Bundle3D] loadObj
-- @param self
-- @param #cc.MeshDatas meshdatas
-- @param #cc.MaterialDatas materialdatas
-- @param #cc.NodeDatas nodedatas
-- @param #string fullPath
-- @param #char mtl_basepath
-- @return bool#bool ret (return value: bool)
-------------------------------- --------------------------------
-- --
-- @function [parent=#Bundle3D] Bundle3D -- @function [parent=#Bundle3D] Bundle3D

View File

@ -0,0 +1,78 @@
--------------------------------
-- @module NavMesh
-- @extend Ref
-- @parent_module cc
--------------------------------
-- remove a obstacle from navmesh.
-- @function [parent=#NavMesh] removeNavMeshObstacle
-- @param self
-- @param #cc.NavMeshObstacle obstacle
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- remove a agent from navmesh.
-- @function [parent=#NavMesh] removeNavMeshAgent
-- @param self
-- @param #cc.NavMeshAgent agent
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- update navmesh.
-- @function [parent=#NavMesh] update
-- @param self
-- @param #float dt
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- Check enabled debug draw.
-- @function [parent=#NavMesh] isDebugDrawEnabled
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- add a agent to navmesh.
-- @function [parent=#NavMesh] addNavMeshAgent
-- @param self
-- @param #cc.NavMeshAgent agent
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- add a obstacle to navmesh.
-- @function [parent=#NavMesh] addNavMeshObstacle
-- @param self
-- @param #cc.NavMeshObstacle obstacle
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- Enable debug draw or disable.
-- @function [parent=#NavMesh] setDebugDrawEnable
-- @param self
-- @param #bool enable
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- Internal method, the updater of debug drawing, need called each frame.
-- @function [parent=#NavMesh] debugDraw
-- @param self
-- @param #cc.Renderer renderer
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
--------------------------------
-- Create navmesh<br>
-- param navFilePath The NavMesh File path.<br>
-- param geomFilePath The geometry File Path,include offmesh information,etc.
-- @function [parent=#NavMesh] create
-- @param self
-- @param #string navFilePath
-- @param #string geomFilePath
-- @return NavMesh#NavMesh ret (return value: cc.NavMesh)
--------------------------------
--
-- @function [parent=#NavMesh] NavMesh
-- @param self
-- @return NavMesh#NavMesh self (return value: cc.NavMesh)
return nil

View File

@ -0,0 +1,225 @@
--------------------------------
-- @module NavMeshAgent
-- @extend Component
-- @parent_module cc
--------------------------------
-- set maximal speed of agent
-- @function [parent=#NavMeshAgent] setMaxSpeed
-- @param self
-- @param #float maxSpeed
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- synchronize parameter to node.
-- @function [parent=#NavMeshAgent] syncToNode
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- Traverse OffMeshLink manually
-- @function [parent=#NavMeshAgent] completeOffMeshLink
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- get separation weight
-- @function [parent=#NavMeshAgent] getSeparationWeight
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Set automatic Traverse OffMeshLink
-- @function [parent=#NavMeshAgent] setAutoTraverseOffMeshLink
-- @param self
-- @param #bool isAuto
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- get current velocity
-- @function [parent=#NavMeshAgent] getCurrentVelocity
-- @param self
-- @return vec3_table#vec3_table ret (return value: vec3_table)
--------------------------------
-- synchronize parameter to agent.
-- @function [parent=#NavMeshAgent] syncToAgent
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- Check agent arrived OffMeshLink
-- @function [parent=#NavMeshAgent] isOnOffMeshLink
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- set separation weight
-- @function [parent=#NavMeshAgent] setSeparationWeight
-- @param self
-- @param #float weight
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- puase movement
-- @function [parent=#NavMeshAgent] pause
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] getUserData
-- @param self
-- @return void#void ret (return value: void)
--------------------------------
-- Set automatic Orientation
-- @function [parent=#NavMeshAgent] setAutoOrientation
-- @param self
-- @param #bool isAuto
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- get agent height
-- @function [parent=#NavMeshAgent] getHeight
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- get maximal speed of agent
-- @function [parent=#NavMeshAgent] getMaxSpeed
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Get current OffMeshLink information
-- @function [parent=#NavMeshAgent] getCurrentOffMeshLinkData
-- @param self
-- @return OffMeshLinkData#OffMeshLinkData ret (return value: cc.OffMeshLinkData)
--------------------------------
-- get agent radius
-- @function [parent=#NavMeshAgent] getRadius
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- synchronization between node and agent is time consuming, you can skip some synchronization using this function
-- @function [parent=#NavMeshAgent] setSyncFlag
-- @param self
-- @param #int flag
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] getSyncFlag
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- resume movement
-- @function [parent=#NavMeshAgent] resume
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- stop movement
-- @function [parent=#NavMeshAgent] stop
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- set maximal acceleration of agent
-- @function [parent=#NavMeshAgent] setMaxAcceleration
-- @param self
-- @param #float maxAcceleration
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- Set the reference axes of agent's orientation<br>
-- param rotRefAxes The value of reference axes in local coordinate system.
-- @function [parent=#NavMeshAgent] setOrientationRefAxes
-- @param self
-- @param #vec3_table rotRefAxes
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- get maximal acceleration of agent
-- @function [parent=#NavMeshAgent] getMaxAcceleration
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- set agent height
-- @function [parent=#NavMeshAgent] setHeight
-- @param self
-- @param #float height
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] setUserData
-- @param self
-- @param #void data
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- get obstacle avoidance type
-- @function [parent=#NavMeshAgent] getObstacleAvoidanceType
-- @param self
-- @return unsigned char#unsigned char ret (return value: unsigned char)
--------------------------------
-- get current velocity
-- @function [parent=#NavMeshAgent] getVelocity
-- @param self
-- @return vec3_table#vec3_table ret (return value: vec3_table)
--------------------------------
-- set agent radius
-- @function [parent=#NavMeshAgent] setRadius
-- @param self
-- @param #float radius
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
-- set obstacle avoidance type
-- @function [parent=#NavMeshAgent] setObstacleAvoidanceType
-- @param self
-- @param #unsigned char type
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] getNavMeshAgentComponentName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- Create agent<br>
-- param param The parameters of agent.
-- @function [parent=#NavMeshAgent] create
-- @param self
-- @param #cc.NavMeshAgentParam param
-- @return NavMeshAgent#NavMeshAgent ret (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] onEnter
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] onExit
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
--------------------------------
--
-- @function [parent=#NavMeshAgent] NavMeshAgent
-- @param self
-- @return NavMeshAgent#NavMeshAgent self (return value: cc.NavMeshAgent)
return nil

View File

@ -0,0 +1,86 @@
--------------------------------
-- @module NavMeshObstacle
-- @extend Component
-- @parent_module cc
--------------------------------
--
-- @function [parent=#NavMeshObstacle] getSyncFlag
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
--
-- @function [parent=#NavMeshObstacle] initWith
-- @param self
-- @param #float radius
-- @param #float height
-- @return bool#bool ret (return value: bool)
--------------------------------
-- synchronize parameter to obstacle.
-- @function [parent=#NavMeshObstacle] syncToObstacle
-- @param self
-- @return NavMeshObstacle#NavMeshObstacle self (return value: cc.NavMeshObstacle)
--------------------------------
-- synchronize parameter to node.
-- @function [parent=#NavMeshObstacle] syncToNode
-- @param self
-- @return NavMeshObstacle#NavMeshObstacle self (return value: cc.NavMeshObstacle)
--------------------------------
-- Get height of obstacle
-- @function [parent=#NavMeshObstacle] getHeight
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- synchronization between node and obstacle is time consuming, you can skip some synchronization using this function
-- @function [parent=#NavMeshObstacle] setSyncFlag
-- @param self
-- @param #int flag
-- @return NavMeshObstacle#NavMeshObstacle self (return value: cc.NavMeshObstacle)
--------------------------------
-- Get radius of obstacle
-- @function [parent=#NavMeshObstacle] getRadius
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Create obstacle, shape is cylinder<br>
-- param radius The radius of obstacle.<br>
-- param height The height of obstacle.
-- @function [parent=#NavMeshObstacle] create
-- @param self
-- @param #float radius
-- @param #float height
-- @return NavMeshObstacle#NavMeshObstacle ret (return value: cc.NavMeshObstacle)
--------------------------------
--
-- @function [parent=#NavMeshObstacle] getNavMeshObstacleComponentName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
--
-- @function [parent=#NavMeshObstacle] onEnter
-- @param self
-- @return NavMeshObstacle#NavMeshObstacle self (return value: cc.NavMeshObstacle)
--------------------------------
--
-- @function [parent=#NavMeshObstacle] onExit
-- @param self
-- @return NavMeshObstacle#NavMeshObstacle self (return value: cc.NavMeshObstacle)
--------------------------------
--
-- @function [parent=#NavMeshObstacle] NavMeshObstacle
-- @param self
-- @return NavMeshObstacle#NavMeshObstacle self (return value: cc.NavMeshObstacle)
return nil

View File

@ -0,0 +1,19 @@
--------------------------------
-- @module cc
--------------------------------------------------------
-- the cc NavMeshAgent
-- @field [parent=#cc] NavMeshAgent#NavMeshAgent NavMeshAgent preloaded module
--------------------------------------------------------
-- the cc NavMeshObstacle
-- @field [parent=#cc] NavMeshObstacle#NavMeshObstacle NavMeshObstacle preloaded module
--------------------------------------------------------
-- the cc NavMesh
-- @field [parent=#cc] NavMesh#NavMesh NavMesh preloaded module
return nil

View File

@ -6090,75 +6090,6 @@ int lua_cocos2dx_3d_Bundle3D_destroyBundle(lua_State* tolua_S)
#endif #endif
return 0; return 0;
} }
int lua_cocos2dx_3d_Bundle3D_loadObj(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Bundle3D",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 4)
{
cocos2d::MeshDatas arg0;
cocos2d::MaterialDatas arg1;
cocos2d::NodeDatas arg2;
std::string arg3;
#pragma warning NO CONVERSION TO NATIVE FOR MeshDatas
ok = false;
#pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas
ok = false;
#pragma warning NO CONVERSION TO NATIVE FOR NodeDatas
ok = false;
ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.Bundle3D:loadObj");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadObj'", nullptr);
return 0;
}
bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
if (argc == 5)
{
cocos2d::MeshDatas arg0;
cocos2d::MaterialDatas arg1;
cocos2d::NodeDatas arg2;
std::string arg3;
const char* arg4;
#pragma warning NO CONVERSION TO NATIVE FOR MeshDatas
ok = false;
#pragma warning NO CONVERSION TO NATIVE FOR MaterialDatas
ok = false;
#pragma warning NO CONVERSION TO NATIVE FOR NodeDatas
ok = false;
ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.Bundle3D:loadObj");
std::string arg4_tmp; ok &= luaval_to_std_string(tolua_S, 6, &arg4_tmp, "cc.Bundle3D:loadObj"); arg4 = arg4_tmp.c_str();
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_Bundle3D_loadObj'", nullptr);
return 0;
}
bool ret = cocos2d::Bundle3D::loadObj(arg0, arg1, arg2, arg3, arg4);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Bundle3D:loadObj",argc, 4);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_Bundle3D_loadObj'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_3d_Bundle3D_constructor(lua_State* tolua_S) int lua_cocos2dx_3d_Bundle3D_constructor(lua_State* tolua_S)
{ {
int argc = 0; int argc = 0;
@ -6215,7 +6146,6 @@ int lua_register_cocos2dx_3d_Bundle3D(lua_State* tolua_S)
tolua_function(tolua_S,"loadAnimationData",lua_cocos2dx_3d_Bundle3D_loadAnimationData); tolua_function(tolua_S,"loadAnimationData",lua_cocos2dx_3d_Bundle3D_loadAnimationData);
tolua_function(tolua_S,"createBundle", lua_cocos2dx_3d_Bundle3D_createBundle); tolua_function(tolua_S,"createBundle", lua_cocos2dx_3d_Bundle3D_createBundle);
tolua_function(tolua_S,"destroyBundle", lua_cocos2dx_3d_Bundle3D_destroyBundle); tolua_function(tolua_S,"destroyBundle", lua_cocos2dx_3d_Bundle3D_destroyBundle);
tolua_function(tolua_S,"loadObj", lua_cocos2dx_3d_Bundle3D_loadObj);
tolua_endmodule(tolua_S); tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::Bundle3D).name(); std::string typeName = typeid(cocos2d::Bundle3D).name();
g_luaType[typeName] = "cc.Bundle3D"; g_luaType[typeName] = "cc.Bundle3D";

View File

@ -141,7 +141,6 @@ int register_all_cocos2dx_3d(lua_State* tolua_S);
#endif // __cocos2dx_3d_h__ #endif // __cocos2dx_3d_h__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,72 @@
#include "base/ccConfig.h"
#if CC_USE_NAVMESH
#ifndef __cocos2dx_navmesh_h__
#define __cocos2dx_navmesh_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_navmesh(lua_State* tolua_S);
#endif // __cocos2dx_navmesh_h__
#endif //#if CC_USE_NAVMESH