00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _ABSTRACTCOLLISIONLISTENER_
00019 #define _ABSTRACTCOLLISIONLISTENER_
00020
00021 #include <boost/shared_ptr.hpp>
00022
00023 #include "contrib/box2d/Include/box2d.h"
00024
00025 #include "util/Vector2.h"
00026
00027 class GameEntity;
00028
00029 struct CollisionInfo
00030 {
00031 GameEntity* _pOther;
00032 b2Shape* _pShape1;
00033 b2Shape* _pShape2;
00034 Vector2 _contactPoint;
00035 Vector2 _force;
00036 };
00037
00038 class AbstractCollisionListener
00039 {
00040 public:
00041 virtual void OnCollision(const CollisionInfo & collisionInfo) = 0;
00042 };
00043
00044 typedef boost::shared_ptr<AbstractCollisionListener> AbstractCollisionListenerPtr;
00045
00046 #endif