Introduced btActionInterface. This makes it easier to extend user-defined actions, such as vehicles and characters.

btRaycastVehicle and btKinematicCharacterController are derived from btActionInterface now.
Some cosmetic cleanup: changed sourceforce/sf.net url to bulletphysics.com.
This commit is contained in:
erwin.coumans
2009-03-03 16:18:23 +00:00
parent 459c22e7cb
commit 90f96aec27
38 changed files with 409 additions and 203 deletions

View File

@@ -20,10 +20,10 @@ subject to the following restrictions:
#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
class btTypedConstraint;
class btRaycastVehicle;
class btActionInterface;
class btConstraintSolver;
class btDynamicsWorld;
class btCharacterControllerInterface;
/// Type for the callback for each tick
typedef void (*btInternalTickCallback)(btDynamicsWorld *world, btScalar timeStep);
@@ -72,14 +72,9 @@ public:
virtual void removeConstraint(btTypedConstraint* constraint) {(void)constraint;}
virtual void addVehicle(btRaycastVehicle* vehicle) {(void)vehicle;}
virtual void removeVehicle(btRaycastVehicle* vehicle) {(void)vehicle;}
virtual void addCharacter(btCharacterControllerInterface* character) {(void)character;}
virtual void removeCharacter(btCharacterControllerInterface* character) {(void)character;}
virtual void addAction(btActionInterface* action) = 0;
virtual void removeAction(btActionInterface* action) = 0;
//once a rigidbody is added to the dynamics world, it will get this gravity assigned
//existing rigidbodies in the world get gravity assigned too, during this method
@@ -129,6 +124,16 @@ public:
}
///obsolete, use addAction instead.
virtual void addVehicle(btActionInterface* vehicle) {(void)vehicle;}
///obsolete, use removeAction instead
virtual void removeVehicle(btActionInterface* vehicle) {(void)vehicle;}
///obsolete, use addAction instead.
virtual void addCharacter(btActionInterface* character) {(void)character;}
///obsolete, use removeAction instead
virtual void removeCharacter(btActionInterface* character) {(void)character;}
};
#endif //BT_DYNAMICS_WORLD_H