diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-12-21 11:46:28 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-21 11:46:28 -0300 |
commit | 78e7777cf5ed721b4802066a769b5ecc0c530c3b (patch) | |
tree | d2a8f851fd3ec87776b7bddec651d7489533278c /core/variant_call.cpp | |
parent | f7f197c40941ffaf03fcddeb20536dec8074ca00 (diff) | |
parent | e7c1137d927baf6daefa218b48ac1c891cb356ee (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
modules/gdscript/gd_editor.cpp
Improved code completion for InputEvent (shows members by type)
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r-- | core/variant_call.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 93a9e6475f..3f2800494d 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -757,6 +757,11 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var r_ret=Quat(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } + static void Quat_init2(Variant& r_ret,const Variant** p_args) { + + r_ret=Quat(((Vector3)(*p_args[0])),((float)(*p_args[1]))); + } + static void Color_init1(Variant& r_ret,const Variant** p_args) { r_ret=Color(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); @@ -1509,6 +1514,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl _VariantCall::add_constructor(_VariantCall::Plane_init3,Variant::PLANE,"normal",Variant::VECTOR3,"d",Variant::REAL); _VariantCall::add_constructor(_VariantCall::Quat_init1,Variant::QUAT,"x",Variant::REAL,"y",Variant::REAL,"z",Variant::REAL,"w",Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Quat_init2,Variant::QUAT,"axis",Variant::VECTOR3,"angle",Variant::REAL); _VariantCall::add_constructor(_VariantCall::Color_init1,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL,"a",Variant::REAL); _VariantCall::add_constructor(_VariantCall::Color_init2,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL); |