diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/3d/navigation_mesh.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
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/3d/navigation_mesh.h')
| -rw-r--r-- | scene/3d/navigation_mesh.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h index e025b7ce8..fda892378 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 |
