diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-11-04 23:22:47 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-11-04 23:22:47 +0400 |
commit | b90de0331df6c92af909b20a3e183596ff3511e4 (patch) | |
tree | ac2f7c512da868f348449eb0a9ad954413274c1e /source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h | |
parent | 64c346ed1ec76bf91303a7f8ca0bbd0587ba2635 (diff) |
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().
Diffstat (limited to 'source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h')
-rw-r--r-- | source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h index 9f6bc85fced..41462f91840 100644 --- a/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h +++ b/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h @@ -48,57 +48,57 @@ class DummyPhysicsEnvironment : public PHY_IPhysicsEnvironment public: DummyPhysicsEnvironment (); virtual ~DummyPhysicsEnvironment (); - virtual void beginFrame(); - virtual void endFrame(); + virtual void BeginFrame(); + virtual void EndFrame(); // Perform an integration step of duration 'timeStep'. - virtual bool proceedDeltaTime(double curTime,float timeStep,float interval); - virtual void setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep); - virtual float getFixedTimeStep(); + virtual bool ProceedDeltaTime(double curTime,float timeStep,float interval); + virtual void SetFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep); + virtual float GetFixedTimeStep(); - virtual void setGravity(float x,float y,float z); - virtual void getGravity(class MT_Vector3& grav); + virtual void SetGravity(float x,float y,float z); + virtual void GetGravity(class MT_Vector3& grav); - virtual int createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type, + virtual int CreateConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type, float pivotX,float pivotY,float pivotZ, float axisX,float axisY,float axisZ, float axis1X=0,float axis1Y=0,float axis1Z=0, float axis2X=0,float axis2Y=0,float axis2Z=0,int flag=0 ); - virtual void removeConstraint(int constraintid); + virtual void RemoveConstraint(int constraintid); //complex constraint for vehicles - virtual PHY_IVehicle* getVehicleConstraint(int constraintId) + virtual PHY_IVehicle* GetVehicleConstraint(int constraintId) { return 0; } // Character physics wrapper - virtual PHY_ICharacter* getCharacterController(class KX_GameObject* ob) + virtual PHY_ICharacter* GetCharacterController(class KX_GameObject* ob) { return 0; } - virtual PHY_IPhysicsController* rayTest(PHY_IRayCastFilterCallback &filterCallback, float fromX,float fromY,float fromZ, float toX,float toY,float toZ); - virtual bool cullingTest(PHY_CullingCallback callback, void* userData, class MT_Vector4* planes, int nplanes, int occlusionRes, const int *viewport, double modelview[16], double projection[16]) { return false; } + virtual PHY_IPhysicsController* RayTest(PHY_IRayCastFilterCallback &filterCallback, float fromX,float fromY,float fromZ, float toX,float toY,float toZ); + virtual bool CullingTest(PHY_CullingCallback callback, void* userData, class MT_Vector4* planes, int nplanes, int occlusionRes, const int *viewport, double modelview[16], double projection[16]) { return false; } //gamelogic callbacks - virtual void addSensor(PHY_IPhysicsController* ctrl) {} - virtual void removeSensor(PHY_IPhysicsController* ctrl) {} - virtual void addTouchCallback(int response_class, PHY_ResponseCallback callback, void *user) + virtual void AddSensor(PHY_IPhysicsController* ctrl) {} + virtual void RemoveSensor(PHY_IPhysicsController* ctrl) {} + virtual void AddTouchCallback(int response_class, PHY_ResponseCallback callback, void *user) { } - virtual bool requestCollisionCallback(PHY_IPhysicsController* ctrl) { return false; } - virtual bool removeCollisionCallback(PHY_IPhysicsController* ctrl) { return false;} + virtual bool RequestCollisionCallback(PHY_IPhysicsController* ctrl) { return false; } + virtual bool RemoveCollisionCallback(PHY_IPhysicsController* ctrl) { return false;} virtual PHY_IPhysicsController* CreateSphereController(float radius,const class MT_Vector3& position) {return 0;} virtual PHY_IPhysicsController* CreateConeController(float coneradius,float coneheight) { return 0;} - virtual void setConstraintParam(int constraintId,int param,float value,float value1) + virtual void SetConstraintParam(int constraintId,int param,float value,float value1) { } - virtual float getConstraintParam(int constraintId,int param) + virtual float GetConstraintParam(int constraintId,int param) { return 0.f; } |