From 2bf9e6090c6d121bc1fddf4d82319a524ad0d963 Mon Sep 17 00:00:00 2001 From: Fabian Keller Date: Sat, 16 Jul 2022 11:47:54 +0200 Subject: rename translate(d) to translate(d)_local in Transform 2D/3D --- modules/csg/csg_shape.cpp | 6 +++--- modules/gridmap/editor/grid_map_editor_plugin.cpp | 4 ++-- modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs | 2 +- modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules') diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index 0f09eb2020..56be4e65f0 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -1858,7 +1858,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { } Transform3D facing = Transform3D().looking_at(direction, current_up); - current_xform = base_xform.translated(current_point) * facing; + current_xform = base_xform.translated_local(current_point) * facing; } // Create the mesh. @@ -1897,7 +1897,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { switch (mode) { case MODE_DEPTH: { - current_xform.translate(Vector3(0, 0, -depth)); + current_xform.translate_local(Vector3(0, 0, -depth)); } break; case MODE_SPIN: { current_xform.rotate(Vector3(0, 1, 0), spin_step); @@ -1945,7 +1945,7 @@ CSGBrush *CSGPolygon3D::_build_brush() { } Transform3D facing = Transform3D().looking_at(direction, current_up); - current_xform = base_xform.translated(current_point) * facing; + current_xform = base_xform.translated_local(current_point) * facing; } break; } diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index b694c109e1..09904481db 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -545,7 +545,7 @@ void GridMapEditor::_update_paste_indicator() { Basis rot; rot.set_orthogonal_index(paste_indicator.orientation); xf.basis = rot * xf.basis; - xf.translate((-center * node->get_cell_size()) / scale); + xf.translate_local((-center * node->get_cell_size()) / scale); RenderingServer::get_singleton()->instance_set_transform(paste_instance, node->get_global_transform() * xf); @@ -553,7 +553,7 @@ void GridMapEditor::_update_paste_indicator() { xf = Transform3D(); xf.origin = (paste_indicator.begin + (paste_indicator.current - paste_indicator.click) + center) * node->get_cell_size(); xf.basis = rot * xf.basis; - xf.translate(item.grid_offset * node->get_cell_size()); + xf.translate_local(item.grid_offset * node->get_cell_size()); Basis item_rot; item_rot.set_orthogonal_index(item.orientation); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs index 89947899cb..e01db7b88c 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs @@ -347,7 +347,7 @@ namespace Godot /// /// The offset to translate by. /// The translated matrix. - public Transform2D Translated(Vector2 offset) + public Transform2D TranslatedLocal(Vector2 offset) { Transform2D copy = this; copy.origin += copy.BasisXform(offset); diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs index 7b211b6577..41565bf680 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Transform3D.cs @@ -239,7 +239,7 @@ namespace Godot /// /// The offset to translate by. /// The translated matrix. - public Transform3D Translated(Vector3 offset) + public Transform3D TranslatedLocal(Vector3 offset) { return new Transform3D(basis, new Vector3 ( -- cgit v1.2.3