summaryrefslogtreecommitdiffstats
path: root/scene/resources/navigation_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/navigation_mesh.cpp')
-rw-r--r--scene/resources/navigation_mesh.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/resources/navigation_mesh.cpp b/scene/resources/navigation_mesh.cpp
index f5d3c7a3fb..13d818188d 100644
--- a/scene/resources/navigation_mesh.cpp
+++ b/scene/resources/navigation_mesh.cpp
@@ -279,13 +279,16 @@ void NavigationMesh::add_polygon(const Vector<int> &p_polygon) {
polygons.push_back(polygon);
_change_notify();
}
+
int NavigationMesh::get_polygon_count() const {
return polygons.size();
}
+
Vector<int> NavigationMesh::get_polygon(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, polygons.size(), Vector<int>());
return polygons[p_idx].indices;
}
+
void NavigationMesh::clear_polygons() {
polygons.clear();
}