summaryrefslogtreecommitdiff
path: root/scene/3d/navigation_mesh.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/navigation_mesh.h')
-rw-r--r--scene/3d/navigation_mesh.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h
index e025b7ce8b..fda8923788 100644
--- a/scene/3d/navigation_mesh.h
+++ b/scene/3d/navigation_mesh.h
@@ -34,9 +34,9 @@
class Mesh;
-class NavigationMesh : public Resource {
+class NavigationMesh : public Resource {
- GDCLASS( NavigationMesh, Resource );
+ GDCLASS(NavigationMesh, Resource);
PoolVector<Vector3> vertices;
struct Polygon {
@@ -50,25 +50,22 @@ class NavigationMesh : public Resource {
Vector3 from;
Vector3 to;
- bool operator<(const _EdgeKey& p_with) const { return from==p_with.from ? to < p_with.to : from < p_with.from; }
+ bool operator<(const _EdgeKey &p_with) const { return from == p_with.from ? to < p_with.to : from < p_with.from; }
};
-
protected:
-
static void _bind_methods();
- void _set_polygons(const Array& p_array);
+ void _set_polygons(const Array &p_array);
Array _get_polygons() const;
public:
+ void create_from_mesh(const Ref<Mesh> &p_mesh);
- void create_from_mesh(const Ref<Mesh>& p_mesh);
-
- void set_vertices(const PoolVector<Vector3>& p_vertices);
+ void set_vertices(const PoolVector<Vector3> &p_vertices);
PoolVector<Vector3> get_vertices() const;
- void add_polygon(const Vector<int>& p_polygon);
+ void add_polygon(const Vector<int> &p_polygon);
int get_polygon_count() const;
Vector<int> get_polygon(int p_idx);
void clear_polygons();
@@ -78,12 +75,11 @@ public:
NavigationMesh();
};
-
class Navigation;
class NavigationMeshInstance : public Spatial {
- GDCLASS(NavigationMeshInstance,Spatial);
+ GDCLASS(NavigationMeshInstance, Spatial);
bool enabled;
int nav_id;
@@ -93,17 +89,14 @@ class NavigationMeshInstance : public Spatial {
Node *debug_view;
protected:
-
void _notification(int p_what);
static void _bind_methods();
-public:
-
-
+public:
void set_enabled(bool p_enabled);
bool is_enabled() const;
- void set_navigation_mesh(const Ref<NavigationMesh>& p_navmesh);
+ void set_navigation_mesh(const Ref<NavigationMesh> &p_navmesh);
Ref<NavigationMesh> get_navigation_mesh() const;
String get_configuration_warning() const;
@@ -111,5 +104,4 @@ public:
NavigationMeshInstance();
};
-
#endif // NAVIGATION_MESH_H