From 69d5de632e04d48a247d50c1dc2c09322129c73a Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Mon, 25 May 2020 20:20:45 +0300 Subject: Split `Geometry` singleton into `Geometry2D` and `Geometry3D` Extra `_2d` suffixes are removed from 2D methods accoringly. --- scene/gui/control.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scene/gui') diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 96aaec6ae9..97daeceda9 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -30,6 +30,7 @@ #include "control.h" +#include "core/math/geometry_2d.h" #include "core/message_queue.h" #include "core/os/keyboard.h" #include "core/os/os.h" @@ -2293,8 +2294,8 @@ void Control::_window_find_focus_neighbour(const Vector2 &p_dir, Node *p_at, con Vector2 fb = points[(j + 1) % 4]; Vector2 pa, pb; - float d = Geometry::get_closest_points_between_segments(la, lb, fa, fb, pa, pb); - //float d = Geometry::get_closest_distance_between_segments(Vector3(la.x,la.y,0),Vector3(lb.x,lb.y,0),Vector3(fa.x,fa.y,0),Vector3(fb.x,fb.y,0)); + float d = Geometry2D::get_closest_points_between_segments(la, lb, fa, fb, pa, pb); + //float d = Geometry2D::get_closest_distance_between_segments(Vector3(la.x,la.y,0),Vector3(lb.x,lb.y,0),Vector3(fa.x,fa.y,0),Vector3(fb.x,fb.y,0)); if (d < r_closest_dist) { r_closest_dist = d; *r_closest = c; -- cgit v1.2.3