New file |
| | |
| | | #if USE_UNI_LUA |
| | | using LuaAPI = UniLua.Lua; |
| | | using RealStatePtr = UniLua.ILuaState; |
| | | using LuaCSFunction = UniLua.CSharpFunctionDelegate; |
| | | #else |
| | | using LuaAPI = XLua.LuaDLL.Lua; |
| | | using RealStatePtr = System.IntPtr; |
| | | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; |
| | | #endif |
| | | |
| | | using XLua; |
| | | using System.Collections.Generic; |
| | | |
| | | |
| | | namespace XLua.CSObjectWrap |
| | | { |
| | | using Utils = XLua.Utils; |
| | | public class UnityEngineVector3Wrap |
| | | { |
| | | public static void __Register(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(UnityEngine.Vector3); |
| | | Utils.BeginObjectRegister(type, L, translator, 6, 6, 6, 3); |
| | | Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__add", __AddMeta); |
| | | Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__sub", __SubMeta); |
| | | Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__unm", __UnmMeta); |
| | | Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__mul", __MulMeta); |
| | | Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__div", __DivMeta); |
| | | Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__eq", __EqMeta); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Set", _m_Set); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Scale", _m_Scale); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHashCode", _m_GetHashCode); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Equals", _m_Equals); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Normalize", _m_Normalize); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ToString", _m_ToString); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalized", _g_get_normalized); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "magnitude", _g_get_magnitude); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "sqrMagnitude", _g_get_sqrMagnitude); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "x", _g_get_x); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "y", _g_get_y); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "z", _g_get_z); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "x", _s_set_x); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "y", _s_set_y); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "z", _s_set_z); |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, __CSIndexer, __NewIndexer, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 24, 8, 0); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Slerp", _m_Slerp_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "SlerpUnclamped", _m_SlerpUnclamped_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "OrthoNormalize", _m_OrthoNormalize_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "RotateTowards", _m_RotateTowards_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Lerp", _m_Lerp_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "LerpUnclamped", _m_LerpUnclamped_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "MoveTowards", _m_MoveTowards_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "SmoothDamp", _m_SmoothDamp_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Scale", _m_Scale_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Cross", _m_Cross_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Reflect", _m_Reflect_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Normalize", _m_Normalize_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Dot", _m_Dot_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Project", _m_Project_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "ProjectOnPlane", _m_ProjectOnPlane_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Angle", _m_Angle_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Distance", _m_Distance_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "ClampMagnitude", _m_ClampMagnitude_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Magnitude", _m_Magnitude_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "SqrMagnitude", _m_SqrMagnitude_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Min", _m_Min_xlua_st_); |
| | | Utils.RegisterFunc(L, Utils.CLS_IDX, "Max", _m_Max_xlua_st_); |
| | | |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "kEpsilon", UnityEngine.Vector3.kEpsilon); |
| | | |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "zero", _g_get_zero); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "one", _g_get_one); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "forward", _g_get_forward); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "back", _g_get_back); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "up", _g_get_up); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "down", _g_get_down); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "left", _g_get_left); |
| | | Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "right", _g_get_right); |
| | | |
| | | |
| | | |
| | | Utils.EndClassRegister(type, L, translator); |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __CreateInstance(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | if(LuaAPI.lua_gettop(L) == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) |
| | | { |
| | | float _x = (float)LuaAPI.lua_tonumber(L, 2); |
| | | float _y = (float)LuaAPI.lua_tonumber(L, 3); |
| | | float _z = (float)LuaAPI.lua_tonumber(L, 4); |
| | | |
| | | UnityEngine.Vector3 gen_ret = new UnityEngine.Vector3(_x, _y, _z); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | return 1; |
| | | } |
| | | if(LuaAPI.lua_gettop(L) == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | float _x = (float)LuaAPI.lua_tonumber(L, 2); |
| | | float _y = (float)LuaAPI.lua_tonumber(L, 3); |
| | | |
| | | UnityEngine.Vector3 gen_ret = new UnityEngine.Vector3(_x, _y); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | if (LuaAPI.lua_gettop(L) == 1) |
| | | { |
| | | translator.PushUnityEngineVector3(L, default(UnityEngine.Vector3)); |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Vector3 constructor!"); |
| | | |
| | | } |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | public static int __CSIndexer(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | int index = LuaAPI.xlua_tointeger(L, 2); |
| | | LuaAPI.lua_pushboolean(L, true); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked[index]); |
| | | return 2; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | LuaAPI.lua_pushboolean(L, false); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | public static int __NewIndexer(RealStatePtr L) |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | try { |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | int key = LuaAPI.xlua_tointeger(L, 2); |
| | | gen_to_be_invoked[key] = (float)LuaAPI.lua_tonumber(L, 3); |
| | | LuaAPI.lua_pushboolean(L, true); |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | LuaAPI.lua_pushboolean(L, false); |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __AddMeta(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && translator.Assignable<UnityEngine.Vector3>(L, 2)) |
| | | { |
| | | UnityEngine.Vector3 leftside;translator.Get(L, 1, out leftside); |
| | | UnityEngine.Vector3 rightside;translator.Get(L, 2, out rightside); |
| | | |
| | | translator.PushUnityEngineVector3(L, leftside + rightside); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to right hand of + operator, need UnityEngine.Vector3!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __SubMeta(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && translator.Assignable<UnityEngine.Vector3>(L, 2)) |
| | | { |
| | | UnityEngine.Vector3 leftside;translator.Get(L, 1, out leftside); |
| | | UnityEngine.Vector3 rightside;translator.Get(L, 2, out rightside); |
| | | |
| | | translator.PushUnityEngineVector3(L, leftside - rightside); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to right hand of - operator, need UnityEngine.Vector3!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __UnmMeta(RealStatePtr L) |
| | | { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | try { |
| | | UnityEngine.Vector3 rightside;translator.Get(L, 1, out rightside); |
| | | translator.PushUnityEngineVector3(L, - rightside); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __MulMeta(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | UnityEngine.Vector3 leftside;translator.Get(L, 1, out leftside); |
| | | float rightside = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | translator.PushUnityEngineVector3(L, leftside * rightside); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | if (LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 1) && translator.Assignable<UnityEngine.Vector3>(L, 2)) |
| | | { |
| | | float leftside = (float)LuaAPI.lua_tonumber(L, 1); |
| | | UnityEngine.Vector3 rightside;translator.Get(L, 2, out rightside); |
| | | |
| | | translator.PushUnityEngineVector3(L, leftside * rightside); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to right hand of * operator, need UnityEngine.Vector3!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __DivMeta(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | UnityEngine.Vector3 leftside;translator.Get(L, 1, out leftside); |
| | | float rightside = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | translator.PushUnityEngineVector3(L, leftside / rightside); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to right hand of / operator, need UnityEngine.Vector3!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int __EqMeta(RealStatePtr L) |
| | | { |
| | | |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | if (translator.Assignable<UnityEngine.Vector3>(L, 1) && translator.Assignable<UnityEngine.Vector3>(L, 2)) |
| | | { |
| | | UnityEngine.Vector3 leftside;translator.Get(L, 1, out leftside); |
| | | UnityEngine.Vector3 rightside;translator.Get(L, 2, out rightside); |
| | | |
| | | LuaAPI.lua_pushboolean(L, leftside == rightside); |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } |
| | | catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need UnityEngine.Vector3!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Slerp_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | UnityEngine.Vector3 _b;translator.Get(L, 2, out _b); |
| | | float _t = (float)LuaAPI.lua_tonumber(L, 3); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Slerp( _a, _b, _t ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SlerpUnclamped_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | UnityEngine.Vector3 _b;translator.Get(L, 2, out _b); |
| | | float _t = (float)LuaAPI.lua_tonumber(L, 3); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.SlerpUnclamped( _a, _b, _t ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OrthoNormalize_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 2&& translator.Assignable<UnityEngine.Vector3>(L, 1)&& translator.Assignable<UnityEngine.Vector3>(L, 2)) |
| | | { |
| | | UnityEngine.Vector3 _normal;translator.Get(L, 1, out _normal); |
| | | UnityEngine.Vector3 _tangent;translator.Get(L, 2, out _tangent); |
| | | |
| | | UnityEngine.Vector3.OrthoNormalize( ref _normal, ref _tangent ); |
| | | translator.PushUnityEngineVector3(L, _normal); |
| | | translator.UpdateUnityEngineVector3(L, 1, _normal); |
| | | |
| | | translator.PushUnityEngineVector3(L, _tangent); |
| | | translator.UpdateUnityEngineVector3(L, 2, _tangent); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | if(gen_param_count == 3&& translator.Assignable<UnityEngine.Vector3>(L, 1)&& translator.Assignable<UnityEngine.Vector3>(L, 2)&& translator.Assignable<UnityEngine.Vector3>(L, 3)) |
| | | { |
| | | UnityEngine.Vector3 _normal;translator.Get(L, 1, out _normal); |
| | | UnityEngine.Vector3 _tangent;translator.Get(L, 2, out _tangent); |
| | | UnityEngine.Vector3 _binormal;translator.Get(L, 3, out _binormal); |
| | | |
| | | UnityEngine.Vector3.OrthoNormalize( ref _normal, ref _tangent, ref _binormal ); |
| | | translator.PushUnityEngineVector3(L, _normal); |
| | | translator.UpdateUnityEngineVector3(L, 1, _normal); |
| | | |
| | | translator.PushUnityEngineVector3(L, _tangent); |
| | | translator.UpdateUnityEngineVector3(L, 2, _tangent); |
| | | |
| | | translator.PushUnityEngineVector3(L, _binormal); |
| | | translator.UpdateUnityEngineVector3(L, 3, _binormal); |
| | | |
| | | |
| | | |
| | | |
| | | return 3; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Vector3.OrthoNormalize!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_RotateTowards_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _current;translator.Get(L, 1, out _current); |
| | | UnityEngine.Vector3 _target;translator.Get(L, 2, out _target); |
| | | float _maxRadiansDelta = (float)LuaAPI.lua_tonumber(L, 3); |
| | | float _maxMagnitudeDelta = (float)LuaAPI.lua_tonumber(L, 4); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.RotateTowards( _current, _target, _maxRadiansDelta, _maxMagnitudeDelta ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Lerp_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | UnityEngine.Vector3 _b;translator.Get(L, 2, out _b); |
| | | float _t = (float)LuaAPI.lua_tonumber(L, 3); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Lerp( _a, _b, _t ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_LerpUnclamped_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | UnityEngine.Vector3 _b;translator.Get(L, 2, out _b); |
| | | float _t = (float)LuaAPI.lua_tonumber(L, 3); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.LerpUnclamped( _a, _b, _t ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_MoveTowards_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _current;translator.Get(L, 1, out _current); |
| | | UnityEngine.Vector3 _target;translator.Get(L, 2, out _target); |
| | | float _maxDistanceDelta = (float)LuaAPI.lua_tonumber(L, 3); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.MoveTowards( _current, _target, _maxDistanceDelta ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SmoothDamp_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 4&& translator.Assignable<UnityEngine.Vector3>(L, 1)&& translator.Assignable<UnityEngine.Vector3>(L, 2)&& translator.Assignable<UnityEngine.Vector3>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) |
| | | { |
| | | UnityEngine.Vector3 _current;translator.Get(L, 1, out _current); |
| | | UnityEngine.Vector3 _target;translator.Get(L, 2, out _target); |
| | | UnityEngine.Vector3 _currentVelocity;translator.Get(L, 3, out _currentVelocity); |
| | | float _smoothTime = (float)LuaAPI.lua_tonumber(L, 4); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.SmoothDamp( _current, _target, ref _currentVelocity, _smoothTime ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | translator.PushUnityEngineVector3(L, _currentVelocity); |
| | | translator.UpdateUnityEngineVector3(L, 3, _currentVelocity); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | if(gen_param_count == 5&& translator.Assignable<UnityEngine.Vector3>(L, 1)&& translator.Assignable<UnityEngine.Vector3>(L, 2)&& translator.Assignable<UnityEngine.Vector3>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)) |
| | | { |
| | | UnityEngine.Vector3 _current;translator.Get(L, 1, out _current); |
| | | UnityEngine.Vector3 _target;translator.Get(L, 2, out _target); |
| | | UnityEngine.Vector3 _currentVelocity;translator.Get(L, 3, out _currentVelocity); |
| | | float _smoothTime = (float)LuaAPI.lua_tonumber(L, 4); |
| | | float _maxSpeed = (float)LuaAPI.lua_tonumber(L, 5); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.SmoothDamp( _current, _target, ref _currentVelocity, _smoothTime, _maxSpeed ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | translator.PushUnityEngineVector3(L, _currentVelocity); |
| | | translator.UpdateUnityEngineVector3(L, 3, _currentVelocity); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | if(gen_param_count == 6&& translator.Assignable<UnityEngine.Vector3>(L, 1)&& translator.Assignable<UnityEngine.Vector3>(L, 2)&& translator.Assignable<UnityEngine.Vector3>(L, 3)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 6)) |
| | | { |
| | | UnityEngine.Vector3 _current;translator.Get(L, 1, out _current); |
| | | UnityEngine.Vector3 _target;translator.Get(L, 2, out _target); |
| | | UnityEngine.Vector3 _currentVelocity;translator.Get(L, 3, out _currentVelocity); |
| | | float _smoothTime = (float)LuaAPI.lua_tonumber(L, 4); |
| | | float _maxSpeed = (float)LuaAPI.lua_tonumber(L, 5); |
| | | float _deltaTime = (float)LuaAPI.lua_tonumber(L, 6); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.SmoothDamp( _current, _target, ref _currentVelocity, _smoothTime, _maxSpeed, _deltaTime ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | translator.PushUnityEngineVector3(L, _currentVelocity); |
| | | translator.UpdateUnityEngineVector3(L, 3, _currentVelocity); |
| | | |
| | | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Vector3.SmoothDamp!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Set(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | |
| | | |
| | | |
| | | { |
| | | float _new_x = (float)LuaAPI.lua_tonumber(L, 2); |
| | | float _new_y = (float)LuaAPI.lua_tonumber(L, 3); |
| | | float _new_z = (float)LuaAPI.lua_tonumber(L, 4); |
| | | |
| | | gen_to_be_invoked.Set( _new_x, _new_y, _new_z ); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Scale_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | UnityEngine.Vector3 _b;translator.Get(L, 2, out _b); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Scale( _a, _b ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Scale(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _scale;translator.Get(L, 2, out _scale); |
| | | |
| | | gen_to_be_invoked.Scale( _scale ); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Cross_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _lhs;translator.Get(L, 1, out _lhs); |
| | | UnityEngine.Vector3 _rhs;translator.Get(L, 2, out _rhs); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Cross( _lhs, _rhs ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetHashCode(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetHashCode( ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Equals(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | |
| | | |
| | | |
| | | { |
| | | object _other = translator.GetObject(L, 2, typeof(object)); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.Equals( _other ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Reflect_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _inDirection;translator.Get(L, 1, out _inDirection); |
| | | UnityEngine.Vector3 _inNormal;translator.Get(L, 2, out _inNormal); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Reflect( _inDirection, _inNormal ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Normalize_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _value;translator.Get(L, 1, out _value); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Normalize( _value ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Normalize(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.Normalize( ); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Dot_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _lhs;translator.Get(L, 1, out _lhs); |
| | | UnityEngine.Vector3 _rhs;translator.Get(L, 2, out _rhs); |
| | | |
| | | float gen_ret = UnityEngine.Vector3.Dot( _lhs, _rhs ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Project_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vector;translator.Get(L, 1, out _vector); |
| | | UnityEngine.Vector3 _onNormal;translator.Get(L, 2, out _onNormal); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Project( _vector, _onNormal ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ProjectOnPlane_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vector;translator.Get(L, 1, out _vector); |
| | | UnityEngine.Vector3 _planeNormal;translator.Get(L, 2, out _planeNormal); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.ProjectOnPlane( _vector, _planeNormal ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Angle_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _from;translator.Get(L, 1, out _from); |
| | | UnityEngine.Vector3 _to;translator.Get(L, 2, out _to); |
| | | |
| | | float gen_ret = UnityEngine.Vector3.Angle( _from, _to ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Distance_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | UnityEngine.Vector3 _b;translator.Get(L, 2, out _b); |
| | | |
| | | float gen_ret = UnityEngine.Vector3.Distance( _a, _b ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ClampMagnitude_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _vector;translator.Get(L, 1, out _vector); |
| | | float _maxLength = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.ClampMagnitude( _vector, _maxLength ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Magnitude_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | |
| | | float gen_ret = UnityEngine.Vector3.Magnitude( _a ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SqrMagnitude_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _a;translator.Get(L, 1, out _a); |
| | | |
| | | float gen_ret = UnityEngine.Vector3.SqrMagnitude( _a ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Min_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _lhs;translator.Get(L, 1, out _lhs); |
| | | UnityEngine.Vector3 _rhs;translator.Get(L, 2, out _rhs); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Min( _lhs, _rhs ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_Max_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | |
| | | |
| | | { |
| | | UnityEngine.Vector3 _lhs;translator.Get(L, 1, out _lhs); |
| | | UnityEngine.Vector3 _rhs;translator.Get(L, 2, out _rhs); |
| | | |
| | | UnityEngine.Vector3 gen_ret = UnityEngine.Vector3.Max( _lhs, _rhs ); |
| | | translator.PushUnityEngineVector3(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_ToString(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 1) |
| | | { |
| | | |
| | | string gen_ret = gen_to_be_invoked.ToString( ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) |
| | | { |
| | | string _format = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | string gen_ret = gen_to_be_invoked.ToString( _format ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Vector3.ToString!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_normalized(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | translator.PushUnityEngineVector3(L, gen_to_be_invoked.normalized); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_magnitude(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.magnitude); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_sqrMagnitude(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.sqrMagnitude); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_zero(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.zero); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_one(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.one); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_forward(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.forward); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_back(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.back); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_up(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.up); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_down(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.down); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_left(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.left); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_right(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | translator.PushUnityEngineVector3(L, UnityEngine.Vector3.right); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_x(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.x); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_y(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.y); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_z(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | LuaAPI.lua_pushnumber(L, gen_to_be_invoked.z); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_x(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | gen_to_be_invoked.x = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_y(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | gen_to_be_invoked.y = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_z(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | UnityEngine.Vector3 gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); |
| | | gen_to_be_invoked.z = (float)LuaAPI.lua_tonumber(L, 2); |
| | | |
| | | translator.UpdateUnityEngineVector3(L, 1, gen_to_be_invoked); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |