summaryrefslogtreecommitdiff
path: root/servers/physics_2d/body_2d_sw.h
diff options
context:
space:
mode:
authorAnton Yabchinskiy <arn@bestmx.ru>2015-01-10 22:29:17 +0300
committerAnton Yabchinskiy <arn@bestmx.ru>2015-01-10 22:29:17 +0300
commitb6c5cb1064eab63788060dc918d7fec53e57a532 (patch)
tree83f8345dd6ee0bc432ec21fc979c628edd808e5e /servers/physics_2d/body_2d_sw.h
parenta7875c586af74302584544d777b189f4cb85c393 (diff)
parentf97582b5e9f069176a4c9226c39a880f786dae67 (diff)
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'servers/physics_2d/body_2d_sw.h')
-rw-r--r--servers/physics_2d/body_2d_sw.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index 789fb1cfee..5bd68ba976 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -47,6 +47,10 @@ class Body2DSW : public CollisionObject2DSW {
Vector2 linear_velocity;
real_t angular_velocity;
+ real_t linear_damp;
+ real_t angular_damp;
+ real_t gravity_scale;
+
real_t mass;
real_t bounce;
real_t friction;
@@ -55,7 +59,8 @@ class Body2DSW : public CollisionObject2DSW {
real_t _inv_inertia;
Vector2 gravity;
- real_t density;
+ real_t area_linear_damp;
+ real_t area_angular_damp;
real_t still_time;
@@ -219,8 +224,10 @@ public:
_FORCE_INLINE_ real_t get_inv_inertia() const { return _inv_inertia; }
_FORCE_INLINE_ real_t get_friction() const { return friction; }
_FORCE_INLINE_ Vector2 get_gravity() const { return gravity; }
- _FORCE_INLINE_ real_t get_density() const { return density; }
_FORCE_INLINE_ real_t get_bounce() const { return bounce; }
+ _FORCE_INLINE_ real_t get_linear_damp() const { return linear_damp; }
+ _FORCE_INLINE_ real_t get_angular_damp() const { return angular_damp; }
+
void integrate_forces(real_t p_step);
void integrate_velocities(real_t p_step);
@@ -306,7 +313,8 @@ public:
real_t step;
virtual Vector2 get_total_gravity() const { return body->get_gravity(); } // get gravity vector working on this body space/area
- virtual float get_total_density() const { return body->get_density(); } // get density of this body space/area
+ virtual float get_total_angular_damp() const { return body->get_angular_damp(); } // get density of this body space/area
+ virtual float get_total_linear_damp() const { return body->get_linear_damp(); } // get density of this body space/area
virtual float get_inverse_mass() const { return body->get_inv_mass(); } // get the mass
virtual real_t get_inverse_inertia() const { return body->get_inv_inertia(); } // get density of this body space