summaryrefslogtreecommitdiff
path: root/scene/2d/joints_2d.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/joints_2d.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/joints_2d.h')
-rw-r--r--scene/2d/joints_2d.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/scene/2d/joints_2d.h b/scene/2d/joints_2d.h
index 3b3eec6bd6..c172620461 100644
--- a/scene/2d/joints_2d.h
+++ b/scene/2d/joints_2d.h
@@ -29,12 +29,11 @@
#ifndef JOINTS_2D_H
#define JOINTS_2D_H
-
#include "node_2d.h"
class Joint2D : public Node2D {
- GDCLASS(Joint2D,Node2D);
+ GDCLASS(Joint2D, Node2D);
RID joint;
@@ -44,21 +43,19 @@ class Joint2D : public Node2D {
bool exclude_from_collision;
-
protected:
-
void _update_joint();
void _notification(int p_what);
- virtual RID _configure_joint()=0;
+ virtual RID _configure_joint() = 0;
static void _bind_methods();
-public:
- void set_node_a(const NodePath& p_node_a);
+public:
+ void set_node_a(const NodePath &p_node_a);
NodePath get_node_a() const;
- void set_node_b(const NodePath& p_node_b);
+ void set_node_b(const NodePath &p_node_b);
NodePath get_node_b() const;
void set_bias(real_t p_bias);
@@ -69,23 +66,20 @@ public:
RID get_joint() const { return joint; }
Joint2D();
-
};
-
class PinJoint2D : public Joint2D {
- GDCLASS(PinJoint2D,Joint2D);
+ GDCLASS(PinJoint2D, Joint2D);
real_t softness;
protected:
-
void _notification(int p_what);
virtual RID _configure_joint();
static void _bind_methods();
-public:
+public:
void set_softness(real_t p_stiffness);
real_t get_softness() const;
@@ -94,18 +88,17 @@ public:
class GrooveJoint2D : public Joint2D {
- GDCLASS(GrooveJoint2D,Joint2D);
+ GDCLASS(GrooveJoint2D, Joint2D);
real_t length;
real_t initial_offset;
protected:
-
void _notification(int p_what);
virtual RID _configure_joint();
static void _bind_methods();
-public:
+public:
void set_length(real_t p_length);
real_t get_length() const;
@@ -117,7 +110,7 @@ public:
class DampedSpringJoint2D : public Joint2D {
- GDCLASS(DampedSpringJoint2D,Joint2D);
+ GDCLASS(DampedSpringJoint2D, Joint2D);
real_t stiffness;
real_t damping;
@@ -125,12 +118,11 @@ class DampedSpringJoint2D : public Joint2D {
real_t length;
protected:
-
void _notification(int p_what);
virtual RID _configure_joint();
static void _bind_methods();
-public:
+public:
void set_length(real_t p_length);
real_t get_length() const;
@@ -146,5 +138,4 @@ public:
DampedSpringJoint2D();
};
-
#endif // JOINTS_2D_H