diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-06-22 23:57:10 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-06-22 23:57:10 -0300 |
commit | 3abb54871f53a767d52aa16f0c8637531a6e547c (patch) | |
tree | 0bccfb466993f5320bfb47627109bc53b7cd8b28 /core/variant_call.cpp | |
parent | db43b9bcf0bf4ccc4867198528fbe9b6f0d18ea6 (diff) | |
parent | 2e6d3b7fadc524f8bdc19929659da365d14ad759 (diff) |
Merge pull request #2072 from jrimclean/master
Interpolation for affine transformations/Bound rot/pos Matrix32 constructor
Diffstat (limited to 'core/variant_call.cpp')
-rw-r--r-- | core/variant_call.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 2f7e0205dc..7dd0eb8a0c 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -750,6 +750,12 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var r_ret=Rect2(*p_args[0],*p_args[1],*p_args[2],*p_args[3]); } + static void Matrix32_init2(Variant& r_ret,const Variant** p_args) { + + Matrix32 m(*p_args[0], *p_args[1]); + r_ret=m; + } + static void Matrix32_init3(Variant& r_ret,const Variant** p_args) { Matrix32 m; @@ -1544,6 +1550,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl _VariantCall::add_constructor(_VariantCall::Rect2_init1,Variant::RECT2,"pos",Variant::VECTOR2,"size",Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Rect2_init2,Variant::RECT2,"x",Variant::REAL,"y",Variant::REAL,"width",Variant::REAL,"height",Variant::REAL); + _VariantCall::add_constructor(_VariantCall::Matrix32_init2,Variant::MATRIX32,"rot",Variant::REAL,"pos",Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Matrix32_init3,Variant::MATRIX32,"x_axis",Variant::VECTOR2,"y_axis",Variant::VECTOR2,"origin",Variant::VECTOR2); _VariantCall::add_constructor(_VariantCall::Vector3_init1,Variant::VECTOR3,"x",Variant::REAL,"y",Variant::REAL,"z",Variant::REAL); |