diff options
Diffstat (limited to 'scene/resources/convex_polygon_shape_2d.cpp')
-rw-r--r-- | scene/resources/convex_polygon_shape_2d.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp index 95967429c9..6b1ddec507 100644 --- a/scene/resources/convex_polygon_shape_2d.cpp +++ b/scene/resources/convex_polygon_shape_2d.cpp @@ -31,8 +31,8 @@ #include "convex_polygon_shape_2d.h" #include "core/math/geometry.h" -#include "servers/physics_2d_server.h" -#include "servers/visual_server.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 { @@ -45,7 +45,7 @@ void ConvexPolygonShape2D::_update_shape() { if (Geometry::is_polygon_clockwise(final_points)) { //needs to be counter clockwise final_points.invert(); } - Physics2DServer::get_singleton()->shape_set_data(get_rid(), final_points); + PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), final_points); emit_changed(); } @@ -81,7 +81,7 @@ void ConvexPolygonShape2D::draw(const RID &p_to_rid, const Color &p_color) { Vector<Color> col; col.push_back(p_color); - VisualServer::get_singleton()->canvas_item_add_polygon(p_to_rid, points, col); + RenderingServer::get_singleton()->canvas_item_add_polygon(p_to_rid, points, col); } Rect2 ConvexPolygonShape2D::get_rect() const { @@ -106,5 +106,5 @@ real_t ConvexPolygonShape2D::get_enclosing_radius() const { } ConvexPolygonShape2D::ConvexPolygonShape2D() : - Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) { + Shape2D(PhysicsServer2D::get_singleton()->convex_polygon_shape_create()) { } |