diff options
Diffstat (limited to 'servers/physics/joints/pin_joint_sw.h')
-rw-r--r-- | servers/physics/joints/pin_joint_sw.h | 29 |
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 |