diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-11-10 07:11:18 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-11-10 07:11:18 +0400 |
commit | f6a110d6ea99b10be72203dee44175624adafa82 (patch) | |
tree | c0b8827ad1483beb5b0228ebf9015c59cfac6df6 /source/gameengine/Physics | |
parent | 489e9cb7881ccf70153b125d34e148b96497ef8d (diff) |
BGE: Committing patch [#32697] "New BGE gravity API" by HG1.
This patch adds a gravity attribute to KX_Scene.
Diffstat (limited to 'source/gameengine/Physics')
3 files changed, 5 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp index d1a8143fa88..d1fabba18f9 100644 --- a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp @@ -85,8 +85,9 @@ void DummyPhysicsEnvironment::setGravity(float x,float y,float z) { } - - +void DummyPhysicsEnvironment::getGravity(PHY__Vector3& grav) +{ +} diff --git a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h index 233c4412d9e..5ce34bdf7cf 100644 --- a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h +++ b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h @@ -56,6 +56,7 @@ public: virtual float getFixedTimeStep(); virtual void setGravity(float x,float y,float z); + virtual void getGravity(PHY__Vector3& grav); virtual int createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type, float pivotX,float pivotY,float pivotZ, diff --git a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h index 077d225903c..bfbe570ad0c 100644 --- a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h +++ b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h @@ -143,6 +143,7 @@ class PHY_IPhysicsEnvironment virtual void setUseEpa(bool epa) {} virtual void setGravity(float x,float y,float z)=0; + virtual void getGravity(PHY__Vector3& grav) = 0; virtual int createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type, float pivotX,float pivotY,float pivotZ, |