summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2020-05-25 20:20:45 +0300
committerAndrii Doroshenko (Xrayez) <xrayez@gmail.com>2020-05-27 14:28:34 +0300
commit69d5de632e04d48a247d50c1dc2c09322129c73a (patch)
tree4b61660efa246c19beac2e0d32d40da3bad10bfc /scene/gui
parent2709ddb163799d33b632eeeea0cdf3cd75ad16b6 (diff)
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
Extra `_2d` suffixes are removed from 2D methods accoringly.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp5
1 files changed, 3 insertions, 2 deletions
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;