summaryrefslogtreecommitdiff
path: root/scene/resources/convex_polygon_shape_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/convex_polygon_shape_2d.cpp')
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index 7df7c3ac72..2b7531c630 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -30,17 +30,17 @@
#include "convex_polygon_shape_2d.h"
-#include "core/math/geometry.h"
+#include "core/math/geometry_2d.h"
#include "servers/physics_server_2d.h"
#include "servers/rendering_server.h"
bool ConvexPolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
- return Geometry::is_point_in_polygon(p_point, points);
+ return Geometry2D::is_point_in_polygon(p_point, points);
}
void ConvexPolygonShape2D::_update_shape() {
Vector<Vector2> final_points = points;
- if (Geometry::is_polygon_clockwise(final_points)) { //needs to be counter clockwise
+ if (Geometry2D::is_polygon_clockwise(final_points)) { //needs to be counter clockwise
final_points.invert();
}
PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), final_points);
@@ -48,7 +48,7 @@ void ConvexPolygonShape2D::_update_shape() {
}
void ConvexPolygonShape2D::set_point_cloud(const Vector<Vector2> &p_points) {
- Vector<Point2> hull = Geometry::convex_hull_2d(p_points);
+ Vector<Point2> hull = Geometry2D::convex_hull(p_points);
ERR_FAIL_COND(hull.size() < 3);
set_points(hull);
}