From 3205a92ad872f918c8322cdcd1434c231a1fd251 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 17 Feb 2020 18:06:54 -0300 Subject: PoolVector is gone, replaced by Vector Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector`. --- scene/resources/convex_polygon_shape.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scene/resources/convex_polygon_shape.cpp') diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp index 21fdcc1f06..b7463605b4 100644 --- a/scene/resources/convex_polygon_shape.cpp +++ b/scene/resources/convex_polygon_shape.cpp @@ -34,7 +34,7 @@ Vector ConvexPolygonShape::get_debug_mesh_lines() { - PoolVector points = get_points(); + Vector points = get_points(); if (points.size() > 3) { @@ -56,8 +56,8 @@ Vector ConvexPolygonShape::get_debug_mesh_lines() { } real_t ConvexPolygonShape::get_enclosing_radius() const { - PoolVector data = get_points(); - PoolVector::Read read = data.read(); + Vector data = get_points(); + const Vector3 *read = data.ptr(); real_t r = 0; for (int i(0); i < data.size(); i++) { r = MAX(read[i].length_squared(), r); @@ -71,14 +71,14 @@ void ConvexPolygonShape::_update_shape() { Shape::_update_shape(); } -void ConvexPolygonShape::set_points(const PoolVector &p_points) { +void ConvexPolygonShape::set_points(const Vector &p_points) { points = p_points; _update_shape(); notify_change_to_owners(); } -PoolVector ConvexPolygonShape::get_points() const { +Vector ConvexPolygonShape::get_points() const { return points; } -- cgit v1.2.3