summaryrefslogtreecommitdiff
path: root/editor/plugins/path_3d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-05-29 12:10:37 +0200
committerGitHub <noreply@github.com>2020-05-29 12:10:37 +0200
commit1620669f4e37c21fa45991a9bc37410014845419 (patch)
treecb9162147bba330ff007c12b349dba070b385a3a /editor/plugins/path_3d_editor_plugin.cpp
parent6aa399be59b886e1c8c371f4ceb09f41c86a0584 (diff)
parent69d5de632e04d48a247d50c1dc2c09322129c73a (diff)
Merge pull request #39051 from Xrayez/geometry-split
Split `Geometry` singleton into `Geometry2D` and `Geometry3D`
Diffstat (limited to 'editor/plugins/path_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index a44fe69ff6..25cffa3d6c 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -30,6 +30,8 @@
#include "path_3d_editor_plugin.h"
+#include "core/math/geometry_2d.h"
+#include "core/math/geometry_3d.h"
#include "core/os/keyboard.h"
#include "node_3d_editor_plugin.h"
#include "scene/resources/curve.h"
@@ -344,7 +346,7 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
Vector2 s[2];
s[0] = p_camera->unproject_position(from);
s[1] = p_camera->unproject_position(to);
- Vector2 inters = Geometry::get_closest_point_to_segment_2d(mbpos, s);
+ Vector2 inters = Geometry2D::get_closest_point_to_segment(mbpos, s);
float d = inters.distance_to(mbpos);
if (d < 10 && d < closest_d) {
@@ -354,7 +356,7 @@ bool Path3DEditorPlugin::forward_spatial_gui_input(Camera3D *p_camera, const Ref
Vector3 ray_dir = p_camera->project_ray_normal(mbpos);
Vector3 ra, rb;
- Geometry::get_closest_points_between_segments(ray_from, ray_from + ray_dir * 4096, from, to, ra, rb);
+ Geometry3D::get_closest_points_between_segments(ray_from, ray_from + ray_dir * 4096, from, to, ra, rb);
closest_seg_point = it.xform(rb);
}