1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

Replace Navigation std::vector use with LocalVector

Replace Navigation std::vector use with LocalVector.
This commit is contained in:
smix8
2022-07-28 19:24:14 +02:00
parent edb503cd00
commit 8d4922cfb1
6 changed files with 64 additions and 58 deletions

View File

@@ -34,7 +34,7 @@
#include "core/math/vector3.h"
#include "core/templates/hash_map.h"
#include "core/templates/hashfuncs.h"
#include "core/templates/vector.h"
#include "core/templates/local_vector.h"
#include <vector>
class NavRegion;
@@ -96,13 +96,13 @@ struct Polygon {
NavRegion *owner = nullptr;
/// The points of this `Polygon`
std::vector<Point> points;
LocalVector<Point> points;
/// Are the points clockwise ?
bool clockwise;
/// The edges of this `Polygon`
std::vector<Edge> edges;
LocalVector<Edge> edges;
/// The center of this `Polygon`
Vector3 center;
@@ -124,6 +124,8 @@ struct NavigationPoly {
/// The distance to the destination.
float traveled_distance = 0.0;
NavigationPoly() { poly = nullptr; }
NavigationPoly(const Polygon *p_poly) :
poly(p_poly) {}