Expose Transform3D::sphere_interpolate_with()

This commit is contained in:
Max Hilbrunner 2022-01-27 02:53:20 +01:00
parent 2c7ff931df
commit 5deb5ebf23
2 changed files with 9 additions and 0 deletions

View File

@ -1789,6 +1789,7 @@ static void _register_variant_builtin_methods() {
bind_method(Transform3D, scaled, sarray("scale"), varray()); bind_method(Transform3D, scaled, sarray("scale"), varray());
bind_method(Transform3D, translated, sarray("offset"), varray()); bind_method(Transform3D, translated, sarray("offset"), varray());
bind_method(Transform3D, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0))); bind_method(Transform3D, looking_at, sarray("target", "up"), varray(Vector3(0, 1, 0)));
bind_method(Transform3D, sphere_interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, interpolate_with, sarray("xform", "weight"), varray()); bind_method(Transform3D, interpolate_with, sarray("xform", "weight"), varray());
bind_method(Transform3D, is_equal_approx, sarray("xform"), varray()); bind_method(Transform3D, is_equal_approx, sarray("xform"), varray());

View File

@ -106,6 +106,14 @@
Scales basis and origin of the transform by the given scale factor, using matrix multiplication. Scales basis and origin of the transform by the given scale factor, using matrix multiplication.
</description> </description>
</method> </method>
<method name="sphere_interpolate_with" qualifiers="const">
<return type="Transform3D" />
<argument index="0" name="xform" type="Transform3D" />
<argument index="1" name="weight" type="float" />
<description>
Returns a transform spherically interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0).
</description>
</method>
<method name="translated" qualifiers="const"> <method name="translated" qualifiers="const">
<return type="Transform3D" /> <return type="Transform3D" />
<argument index="0" name="offset" type="Vector3" /> <argument index="0" name="offset" type="Vector3" />