Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-08-04 09:34:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-04 09:34:21 +0400
commit9bb8540ba9e716363ed654aeb989cf83ea704d4a (patch)
tree409f8794615e3087c9407da4882e7d7b3a8364d5 /source/gameengine/Ketsji
parent59bfe91f217dcb9c4a2ccb44422fe3f20566b751 (diff)
parent856dba000b09409bf6da2865bca2c79dba378683 (diff)
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22130:22205
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_ConstraintActuator.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h16
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp5
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h4
5 files changed, 5 insertions, 31 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
index d09eae647c8..0d69da83081 100644
--- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
+++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
@@ -36,6 +36,7 @@
#include "MT_Matrix3x3.h"
#include "KX_GameObject.h"
#include "KX_RayCast.h"
+#include "KX_PythonInit.h" // KX_GetActiveScene
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -327,7 +328,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame)
}
{
MT_Point3 topoint = position + (m_maximumBound) * direction;
- PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = obj->GetPhysicsController();
if (!pe) {
@@ -440,7 +441,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame)
}
normal.normalize();
{
- PHY_IPhysicsEnvironment* pe = obj->GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = obj->GetPhysicsController();
if (!pe) {
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 170b7405145..fa3a336466c 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -101,7 +101,6 @@ KX_GameObject::KX_GameObject(
m_bOccluder(false),
m_pPhysicsController1(NULL),
m_pGraphicController(NULL),
- m_pPhysicsEnvironment(NULL),
m_xray(false),
m_pHitObject(NULL),
m_isDeformable(false),
@@ -2693,8 +2692,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo,
toDir.normalize();
toPoint = fromPoint + (dist) * toDir;
}
-
- PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = GetPhysicsController();
KX_GameObject *parent = GetParent();
if (!spc && parent)
@@ -2821,7 +2819,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast,
return none_tuple_3();
}
- PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
+ PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
KX_IPhysicsController *spc = GetPhysicsController();
KX_GameObject *parent = GetParent();
if (!spc && parent)
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index b235464259f..ba7451fdeef 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -98,8 +98,6 @@ protected:
KX_IPhysicsController* m_pPhysicsController1;
PHY_IGraphicController* m_pGraphicController;
- // used for ray casting
- PHY_IPhysicsEnvironment* m_pPhysicsEnvironment;
STR_String m_testPropName;
bool m_xray;
KX_GameObject* m_pHitObject;
@@ -337,20 +335,6 @@ public:
bool ang_vel_local
);
-
- /**
- * @return a pointer to the physics environment in use during the game, for rayCasting
- */
- PHY_IPhysicsEnvironment* GetPhysicsEnvironment()
- {
- return m_pPhysicsEnvironment;
- }
-
- void SetPhysicsEnvironment(PHY_IPhysicsEnvironment* physicsEnvironment)
- {
- m_pPhysicsEnvironment = physicsEnvironment;
- }
-
/**
* @return a pointer to the physics controller owned by this class.
*/
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 8c88d55f24c..63d23f5af31 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1579,11 +1579,6 @@ void KX_Scene::SetGravity(const MT_Vector3& gravity)
GetPhysicsEnvironment()->setGravity(gravity[0],gravity[1],gravity[2]);
}
-void KX_Scene::SetNodeTree(SG_Tree* root)
-{
- m_objecttree = root;
-}
-
void KX_Scene::SetSceneConverter(class KX_BlenderSceneConverter* sceneConverter)
{
m_sceneConverter = sceneConverter;
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index d94eac0c6e2..a2e328fb5d5 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -119,10 +119,6 @@ protected:
// the Qlist is for objects that needs to be rescheduled
// for updates after udpate is over (slow parent, bone parent)
- /**
- * The tree of objects in the scene.
- */
- SG_Tree* m_objecttree;
/**
* The set of cameras for this scene