summaryrefslogtreecommitdiff
path: root/scene/2d/navigation_polygon.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/2d/navigation_polygon.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'scene/2d/navigation_polygon.h')
-rw-r--r--scene/2d/navigation_polygon.h34
1 files changed, 13 insertions, 21 deletions
diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h
index 7f1762b6f5..6bc3b903c7 100644
--- a/scene/2d/navigation_polygon.h
+++ b/scene/2d/navigation_polygon.h
@@ -31,41 +31,36 @@
#include "scene/2d/node_2d.h"
+class NavigationPolygon : public Resource {
-class NavigationPolygon : public Resource {
-
- GDCLASS( NavigationPolygon, Resource );
+ GDCLASS(NavigationPolygon, Resource);
PoolVector<Vector2> vertices;
struct Polygon {
Vector<int> indices;
};
Vector<Polygon> polygons;
- Vector< PoolVector<Vector2> > outlines;
+ Vector<PoolVector<Vector2> > outlines;
protected:
-
static void _bind_methods();
- void _set_polygons(const Array& p_array);
+ void _set_polygons(const Array &p_array);
Array _get_polygons() const;
- void _set_outlines(const Array& p_array);
+ void _set_outlines(const Array &p_array);
Array _get_outlines() const;
public:
-
-
-
- void set_vertices(const PoolVector<Vector2>& p_vertices);
+ void set_vertices(const PoolVector<Vector2> &p_vertices);
PoolVector<Vector2> get_vertices() const;
- void add_polygon(const Vector<int>& p_polygon);
+ void add_polygon(const Vector<int> &p_polygon);
int get_polygon_count() const;
- void add_outline(const PoolVector<Vector2>& p_outline);
- void add_outline_at_index(const PoolVector<Vector2>& p_outline,int p_index);
- void set_outline(int p_idx,const PoolVector<Vector2>& p_outline);
+ void add_outline(const PoolVector<Vector2> &p_outline);
+ void add_outline_at_index(const PoolVector<Vector2> &p_outline, int p_index);
+ void set_outline(int p_idx, const PoolVector<Vector2> &p_outline);
PoolVector<Vector2> get_outline(int p_idx) const;
void remove_outline(int p_idx);
int get_outline_count() const;
@@ -79,12 +74,11 @@ public:
NavigationPolygon();
};
-
class Navigation2D;
class NavigationPolygonInstance : public Node2D {
- GDCLASS(NavigationPolygonInstance,Node2D);
+ GDCLASS(NavigationPolygonInstance, Node2D);
bool enabled;
int nav_id;
@@ -94,15 +88,14 @@ class NavigationPolygonInstance : public Node2D {
void _navpoly_changed();
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_polygon(const Ref<NavigationPolygon>& p_navpoly);
+ void set_navigation_polygon(const Ref<NavigationPolygon> &p_navpoly);
Ref<NavigationPolygon> get_navigation_polygon() const;
String get_configuration_warning() const;
@@ -110,5 +103,4 @@ public:
NavigationPolygonInstance();
};
-
#endif // NAVIGATIONPOLYGON_H