Blender Git Loki
Git Commits -> Revision b90de03
Revision b90de03 by Mitchell Stokes (master) November 4, 2013, 19:22 (GMT) |
BGE: Cleaning up the BGE's physics code and removing KX_IPhysicsController and KX_BulletPhysicsController. Instead, we just use PHY_IPhysicsController, which removes a lot of duplicate code. This is a squashed commit of the following: BGE Physics Cleanup: Fix crashes with LibLoading and replication. Also fixing some memory leaks. BGE Physics Cleanup: Removing KX_IPhysicsController and KX_BulletPhysicsController. BGE Physics Cleanup: Moving the replication code outside of KX_BlenderBulletController and switching KX_ConvertPhysicsObjects to create a CcdPhysicsController instead of a KX_BlenderBulletController. BGE Physics Cleanup: Getting rid of an unsued KX_BulletPhysicsController.h include in KX_Scene.cpp. BGE Physics Cleanup: Removing unused KX_IPhysicsController and KX_BulletPhysicsController includes. BGE Physics Cleanup: Removing m_pPhysicsController1 and GetPhysicsController1() from KX_GameObject. BGE Physics Cleanup: Remove SetRigidBody() from KX_IPhysicsController and remove GetName() from CcdPhysicsController. BGE Physics Cleanup: Moving Add/RemoveCompoundChild() from KX_IPhysicsController to PHY_IPhysicsController. BGE Physics Cleanup: Removing GetLocalInertia() from KX_IPhysicsController. BGE Physics Cleanup: Making BlenderBulletCharacterController derive from PHY_ICharacter and removing CharacterWrapper from CcdPhysicsEnvironment.cpp. Also removing the character functions from KX_IPhysicsController. BGE Physics Cleanup: Removing GetOrientation(), SetOrientation(), SetPosition(), SetScaling(), and GetRadius() from KX_IPhysicsController. BGE Physics Cleanup: Removing GetReactionForce() since all implementations returned (0, 0, 0). The Python interface for KX_GameObject still has reaction force code, but it still also returns (0, 0, 0). This can probably be removed as well, but removing it can break scripts, so I'll leave it for now. BGE Physics Cleanup: Removing Get/SetLinVelocityMin() and Get/SetLinVelocityMax() from KX_IPhysicsController. BGE Physics Cleanup: Removing SetMargin(), RelativeTranslate(), and RelativeRotate() from KX_IPhysicsController. BGE Physics Cleanup: Using constant references for function arguments in PHY_IPhysicsController where appropriate. BGE Physics Cleanup: Removing ApplyImpulse() from KX_IPhysicsController. BGE Physics Cleanup: Removing ResolveCombinedVelocities() from KX_IPhysicsController. BGE Physics Cleanup: Accidently removed a return when cleaning up KX_GameObject::PyGetVelocity(). BGE Physics Cleanup: Remove GetLinearVelocity(), GetAngularVelocity() and GetVelocity() from KX_IPhysicsController. The corresponding PHY_IPhysicsController functions now also take Moto types instead of scalars to match the KX_IPhysicsController interface. BGE Physics Cleanup: Moving SuspendDynamics, RestoreDynamics, SetMass, GetMass, and SetTransform from KX_IPhysicsController to PHY_IPhysicsController. BGE Physics Cleanup: PHY_IPhysicsEnvironment and derived classes now use the same naming scheme as PHY_IController. BGE Physics Cleanup: PHY_IMotionState and derived classes now use the same naming convention as PHY_IController. BGE Phsyics Cleanup: Making PHY_IController and its derived classes follow a consistent naming scheme for member functions. They now all start with capital letters (e.g., setWorldOrientation becomes SetWorldOrientation). BGE Physics Cleanup: Getting rid of KX_GameObject::SuspendDynamics() and KX_GameObject::RestoreDynamics(). Instead, use the functions from the physics controller. BGE: Some first steps in trying to cleanup the KX_IPhysicsController mess. KX_GameObject now has a GetPhysicsController() and a GetPhysicsController1(). The former returns a PHY_IPhysicsController* while the latter returns a KX_IPhysicsController. The goal is to get everything using GetPhysicsController() instead of GetPhysicsController1(). |
Commit Details:
Full Hash: b90de0331df6c92af909b20a3e183596ff3511e4
SVN Revision: 61096
Parent Commit: 64c346e
Lines Changed: +973, -1724
4 Deleted Paths:
/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp (+0, -577)
/source/gameengine/Ketsji/KX_BulletPhysicsController.h (+0, -102)
/source/gameengine/Ketsji/KX_IPhysicsController.cpp (+0, -49)
/source/gameengine/Ketsji/KX_IPhysicsController.h (+0, -151)
/source/gameengine/Ketsji/KX_BulletPhysicsController.h (+0, -102)
/source/gameengine/Ketsji/KX_IPhysicsController.cpp (+0, -49)
/source/gameengine/Ketsji/KX_IPhysicsController.h (+0, -151)
44 Modified Paths:
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+13, -27) (Diff)
/source/gameengine/Converter/BL_ModifierDeformer.cpp (+1, -1) (Diff)
/source/gameengine/Converter/KX_BlenderSceneConverter.cpp (+5, -9) (Diff)
/source/gameengine/Converter/KX_SoftBodyDeformer.cpp (+1, -2) (Diff)
/source/gameengine/Ketsji/BL_Action.cpp (+2, -0) (Diff)
/source/gameengine/Ketsji/CMakeLists.txt (+0, -4) (Diff)
/source/gameengine/Ketsji/KX_CharacterWrapper.cpp (+0, -2) (Diff)
/source/gameengine/Ketsji/KX_ConstraintActuator.cpp (+6, -6) (Diff)
/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp (+9, -11) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+94, -99) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+5, -32) (Diff)
/source/gameengine/Ketsji/KX_IPO_SGController.cpp (+5, -4) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+5, -5) (Diff)
/source/gameengine/Ketsji/KX_MotionState.cpp (+8, -8) (Diff)
/source/gameengine/Ketsji/KX_MotionState.h (+8, -8) (Diff)
/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp (+1, -2) (Diff)
/source/gameengine/Ketsji/KX_NearSensor.cpp (+8, -8) (Diff)
/source/gameengine/Ketsji/KX_ObjectActuator.cpp (+16, -7) (Diff)
/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp (+22, -22) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_RadarSensor.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_RayCast.cpp (+4, -5) (Diff)
/source/gameengine/Ketsji/KX_RayCast.h (+3, -4) (Diff)
/source/gameengine/Ketsji/KX_RaySensor.cpp (+1, -2) (Diff)
/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp (+0, -1) (Diff)
/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp (+6, -5) (Diff)
/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h (+0, -1) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+23, -22) (Diff)
/source/gameengine/Ketsji/KX_TouchEventManager.cpp (+7, -7) (Diff)
/source/gameengine/Ketsji/KX_TouchSensor.cpp (+12, -12) (Diff)
/source/gameengine/Physics/Bullet/CcdGraphicController.cpp (+14, -14) (Diff)
/source/gameengine/Physics/Bullet/CcdGraphicController.h (+9, -9) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp (+332, -158) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.h (+84, -43) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp (+80, -140) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h (+60, -59) (Diff)
/source/gameengine/Physics/common/PHY_IController.h (+2, -2) (Diff)
/source/gameengine/Physics/common/PHY_IGraphicController.h (+2, -2) (Diff)
/source/gameengine/Physics/common/PHY_IMotionState.h (+8, -8) (Diff)
/source/gameengine/Physics/common/PHY_IPhysicsController.h (+42, -20) (Diff)
/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h (+39, -38) (Diff)
/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp (+10, -10) (Diff)
/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h (+20, -20) (Diff)
/source/gameengine/Converter/BL_ModifierDeformer.cpp (+1, -1) (Diff)
/source/gameengine/Converter/KX_BlenderSceneConverter.cpp (+5, -9) (Diff)
/source/gameengine/Converter/KX_SoftBodyDeformer.cpp (+1, -2) (Diff)
/source/gameengine/Ketsji/BL_Action.cpp (+2, -0) (Diff)
/source/gameengine/Ketsji/CMakeLists.txt (+0, -4) (Diff)
/source/gameengine/Ketsji/KX_CharacterWrapper.cpp (+0, -2) (Diff)
/source/gameengine/Ketsji/KX_ConstraintActuator.cpp (+6, -6) (Diff)
/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp (+9, -11) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+94, -99) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+5, -32) (Diff)
/source/gameengine/Ketsji/KX_IPO_SGController.cpp (+5, -4) (Diff)
/source/gameengine/Ketsji/KX_KetsjiEngine.cpp (+5, -5) (Diff)
/source/gameengine/Ketsji/KX_MotionState.cpp (+8, -8) (Diff)
/source/gameengine/Ketsji/KX_MotionState.h (+8, -8) (Diff)
/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp (+1, -2) (Diff)
/source/gameengine/Ketsji/KX_NearSensor.cpp (+8, -8) (Diff)
/source/gameengine/Ketsji/KX_ObjectActuator.cpp (+16, -7) (Diff)
/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp (+22, -22) (Diff)
/source/gameengine/Ketsji/KX_PythonInit.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_RadarSensor.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_RayCast.cpp (+4, -5) (Diff)
/source/gameengine/Ketsji/KX_RayCast.h (+3, -4) (Diff)
/source/gameengine/Ketsji/KX_RaySensor.cpp (+1, -2) (Diff)
/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp (+0, -1) (Diff)
/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp (+6, -5) (Diff)
/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h (+0, -1) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+23, -22) (Diff)
/source/gameengine/Ketsji/KX_TouchEventManager.cpp (+7, -7) (Diff)
/source/gameengine/Ketsji/KX_TouchSensor.cpp (+12, -12) (Diff)
/source/gameengine/Physics/Bullet/CcdGraphicController.cpp (+14, -14) (Diff)
/source/gameengine/Physics/Bullet/CcdGraphicController.h (+9, -9) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp (+332, -158) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.h (+84, -43) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp (+80, -140) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h (+60, -59) (Diff)
/source/gameengine/Physics/common/PHY_IController.h (+2, -2) (Diff)
/source/gameengine/Physics/common/PHY_IGraphicController.h (+2, -2) (Diff)
/source/gameengine/Physics/common/PHY_IMotionState.h (+8, -8) (Diff)
/source/gameengine/Physics/common/PHY_IPhysicsController.h (+42, -20) (Diff)
/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h (+39, -38) (Diff)
/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp (+10, -10) (Diff)
/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h (+20, -20) (Diff)