diff options
author | Vincent D <40196601+deakcor@users.noreply.github.com> | 2021-09-02 11:36:19 +0200 |
---|---|---|
committer | Vincent D <40196601+deakcor@users.noreply.github.com> | 2021-09-19 17:10:05 +0200 |
commit | aa82cb6f35f76ba89c7d7cafe023d1e574045182 (patch) | |
tree | e44d02ff73e0ff9fed37266c535d4c758f13c210 /core/variant | |
parent | 18c0f0b3ba46caf3f6dda401362bc5993eaf7f8d (diff) |
Expose get_skew for transform2d and add new constructor
Expose set_scale and set_skew for transform2d
Replacing float by real_t
Adding const parameters
Updated transform2d doc
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant_call.cpp | 3 | ||||
-rw-r--r-- | core/variant/variant_construct.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 39207df9e7..ddc545abf6 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1703,6 +1703,7 @@ static void _register_variant_builtin_methods() { bind_method(Transform2D, get_rotation, sarray(), varray()); bind_method(Transform2D, get_origin, sarray(), varray()); bind_method(Transform2D, get_scale, sarray(), varray()); + bind_method(Transform2D, get_skew, sarray(), varray()); bind_method(Transform2D, orthonormalized, sarray(), varray()); bind_method(Transform2D, rotated, sarray("phi"), varray()); bind_method(Transform2D, scaled, sarray("scale"), varray()); @@ -1712,6 +1713,8 @@ static void _register_variant_builtin_methods() { bind_method(Transform2D, interpolate_with, sarray("xform", "weight"), varray()); bind_method(Transform2D, is_equal_approx, sarray("xform"), varray()); bind_method(Transform2D, set_rotation, sarray("rotation"), varray()); + bind_method(Transform2D, set_scale, sarray("scale"), varray()); + bind_method(Transform2D, set_skew, sarray("skew"), varray()); bind_method(Transform2D, looking_at, sarray("target"), varray(Vector2())); /* Basis */ diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp index a1a2bec369..4317b9dc98 100644 --- a/core/variant/variant_construct.cpp +++ b/core/variant/variant_construct.cpp @@ -114,6 +114,7 @@ void Variant::_register_variant_constructors() { add_constructor<VariantConstructNoArgs<Transform2D>>(sarray()); add_constructor<VariantConstructor<Transform2D, Transform2D>>(sarray("from")); add_constructor<VariantConstructor<Transform2D, float, Vector2>>(sarray("rotation", "position")); + add_constructor<VariantConstructor<Transform2D, float, Size2, float, Vector2>>(sarray("rotation", "scale", "skew", "position")); add_constructor<VariantConstructor<Transform2D, Vector2, Vector2, Vector2>>(sarray("x_axis", "y_axis", "origin")); add_constructor<VariantConstructNoArgs<Plane>>(sarray()); |