summaryrefslogtreecommitdiff
path: root/servers/physics/joints_sw.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics/joints_sw.h')
-rw-r--r--servers/physics/joints_sw.h121
1 files changed, 1 insertions, 120 deletions
diff --git a/servers/physics/joints_sw.h b/servers/physics/joints_sw.h
index c42baae961..b54c655ea1 100644
--- a/servers/physics/joints_sw.h
+++ b/servers/physics/joints_sw.h
@@ -33,7 +33,6 @@
#include "body_sw.h"
-
class JointSW : public ConstraintSW {
@@ -45,122 +44,4 @@ public:
};
-#if 0
-class PinJointSW : public JointSW {
-
- union {
- struct {
- BodySW *A;
- BodySW *B;
- };
-
- BodySW *_arr[2];
- };
-
- Vector2 anchor_A;
- Vector2 anchor_B;
- real_t dist;
- real_t jn_acc;
- real_t jn_max;
- real_t max_distance;
- real_t mass_normal;
- real_t bias;
-
- Vector2 rA,rB;
- Vector2 n; //normal
- bool correct;
-
-
-public:
-
- virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_PIN; }
-
- virtual bool setup(float p_step);
- virtual void solve(float p_step);
-
-
- PinJointSW(const Vector2& p_pos,BodySW* p_body_a,BodySW* p_body_b=NULL);
- ~PinJointSW();
-};
-
-
-class GrooveJointSW : public JointSW {
-
- union {
- struct {
- BodySW *A;
- BodySW *B;
- };
-
- BodySW *_arr[2];
- };
-
- Vector2 A_groove_1;
- Vector2 A_groove_2;
- Vector2 A_groove_normal;
- Vector2 B_anchor;
- Vector2 jn_acc;
- Vector2 gbias;
- real_t jn_max;
- real_t clamp;
- Vector2 xf_normal;
- Vector2 rA,rB;
- Vector2 k1,k2;
-
-
- bool correct;
-
-public:
-
- virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_GROOVE; }
-
- virtual bool setup(float p_step);
- virtual void solve(float p_step);
-
-
- GrooveJointSW(const Vector2& p_a_groove1,const Vector2& p_a_groove2, const Vector2& p_b_anchor, BodySW* p_body_a,BodySW* p_body_b);
- ~GrooveJointSW();
-};
-
-
-class DampedSpringJointSW : public JointSW {
-
- union {
- struct {
- BodySW *A;
- BodySW *B;
- };
-
- BodySW *_arr[2];
- };
-
-
- Vector2 anchor_A;
- Vector2 anchor_B;
-
- real_t rest_length;
- real_t damping;
- real_t stiffness;
-
- Vector2 rA,rB;
- Vector2 n;
- real_t n_mass;
- real_t target_vrn;
- real_t v_coef;
-
-public:
-
- virtual PhysicsServer::JointType get_type() const { return PhysicsServer::JOINT_DAMPED_SPRING; }
-
- virtual bool setup(float p_step);
- virtual void solve(float p_step);
-
- void set_param(PhysicsServer::DampedStringParam p_param, real_t p_value);
- real_t get_param(PhysicsServer::DampedStringParam p_param) const;
-
- DampedSpringJointSW(const Vector2& p_anchor_a,const Vector2& p_anchor_b, BodySW* p_body_a,BodySW* p_body_b);
- ~DampedSpringJointSW();
-};
-#endif
-
-#endif // JOINTS__SW_H
+#endif // JOINTS_SW_H