summaryrefslogtreecommitdiffstats
path: root/servers/physics/joints/pin_joint_sw.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 /servers/physics/joints/pin_joint_sw.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadredot-engine-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz
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 'servers/physics/joints/pin_joint_sw.h')
-rw-r--r--servers/physics/joints/pin_joint_sw.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/servers/physics/joints/pin_joint_sw.h b/servers/physics/joints/pin_joint_sw.h
index b72b21219d..9500d4b46d 100644
--- a/servers/physics/joints/pin_joint_sw.h
+++ b/servers/physics/joints/pin_joint_sw.h
@@ -34,8 +34,8 @@ Adapted to Godot from the Bullet library.
#ifndef PIN_JOINT_SW_H
#define PIN_JOINT_SW_H
-#include "servers/physics/joints_sw.h"
#include "servers/physics/joints/jacobian_entry_sw.h"
+#include "servers/physics/joints_sw.h"
/*
Bullet Continuous Collision Detection and Physics Library
@@ -52,7 +52,6 @@ subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution.
*/
-
class PinJointSW : public JointSW {
union {
@@ -64,37 +63,33 @@ class PinJointSW : public JointSW {
BodySW *_arr[2];
};
+ real_t m_tau; //bias
+ real_t m_damping;
+ real_t m_impulseClamp;
+ real_t m_appliedImpulse;
- real_t m_tau; //bias
- real_t m_damping;
- real_t m_impulseClamp;
- real_t m_appliedImpulse;
-
- JacobianEntrySW m_jac[3]; //3 orthogonal linear constraints
+ JacobianEntrySW m_jac[3]; //3 orthogonal linear constraints
- Vector3 m_pivotInA;
- Vector3 m_pivotInB;
+ Vector3 m_pivotInA;
+ Vector3 m_pivotInB;
public:
-
virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_PIN; }
virtual bool setup(real_t p_step);
virtual void solve(real_t p_step);
- void set_param(PhysicsServer::PinJointParam p_param,real_t p_value);
+ void set_param(PhysicsServer::PinJointParam p_param, real_t p_value);
real_t get_param(PhysicsServer::PinJointParam p_param) const;
- void set_pos_A(const Vector3& p_pos) { m_pivotInA=p_pos; }
- void set_pos_B(const Vector3& p_pos) { m_pivotInB=p_pos; }
+ void set_pos_A(const Vector3 &p_pos) { m_pivotInA = p_pos; }
+ void set_pos_B(const Vector3 &p_pos) { m_pivotInB = p_pos; }
Vector3 get_pos_A() { return m_pivotInB; }
Vector3 get_pos_B() { return m_pivotInA; }
- PinJointSW(BodySW* p_body_a,const Vector3& p_pos_a,BodySW* p_body_b,const Vector3& p_pos_b);
+ PinJointSW(BodySW *p_body_a, const Vector3 &p_pos_a, BodySW *p_body_b, const Vector3 &p_pos_b);
~PinJointSW();
};
-
-
#endif // PIN_JOINT_SW_H